[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
set -o notify spurious CR when jobs redirected to file
From: |
idallen |
Subject: |
set -o notify spurious CR when jobs redirected to file |
Date: |
Thu, 13 Nov 2014 14:21:21 -0500 (EST) |
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).
Repeat-By:
$ sleep 999 &
[1] 16386
$ set +o notify
$ jobs >out
$ file out
out: ASCII text
$ set -o notify
$ jobs >out
$ file out
out: ASCII text, with CRLF line terminators
$ od -c out
0000000 [ 1 ] + R u n n i n g
0000020 s l
0000040 e e p 9 9 9 & \r \n
0000053
$ jobs | od -c
0000000 [ 1 ] + R u n n i n g
0000020 s l
0000040 e e p 9 9 9 & \n
0000052
- set -o notify spurious CR when jobs redirected to file,
idallen <=