On 11/13/14, 2:21 PM, [email protected] wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib
> -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4
> -Wformat -Wformat-security -Werror=format-security -Wall
> uname output: Linux idallen-oak.home.idallen.ca 3.13.0-40-generic
> #68~precise1-Ubuntu SMP Tue Nov 4 16:00:24 UTC 2014 x86_64 x86_64 x86_64
> GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 4.2
> Patch Level: 25
> Release Status: release
>
> Description:
> Using "set -o notify" adds spurious CR to output of "jobs"
> when output is redirected to a file (but not into a pipe).
Yes, it's intended. Piotr identified the code that does this. If the
shell is currently interactive, it can't be sure under what circumstances
it's printing a job notification. If it's doing asynchronous notification,
it puts the \r in there to make the output look better. A process in a
pipeline is not currently interactive, so bash doesn't do that in the
second case.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/