On Sat, Mar 4, 2017 at 10:12 AM, Chet Ramey <chet.ra...@case.edu> wrote:
> On 3/4/17 1:04 AM, Misaki wrote: > > Variables are not saved when using a pipe because both sides are in a > > subshell environment. > > If you want this to happen, enable the `lastpipe' shell option. > Thank you. My standpoint is 'whatever makes things easier for new users', I definitely don't have detailed knowledge of design decisions. But I see this: http://unix.stackexchange.com/questions/143958/in-bash-read-after-a-pipe-is-not-setting-values Someone says that not using a subshell for pipelines is POSIX-compliant. Even if bash does use a subshell, is there a reason why lastpipe also requires job execution to be off (with 'set -m')?