Package: dash
Version: 0.5.12-6
Severity: normal

Dear Maintainer,

I found that 'jobs' in dash is silent when stdout is a pipe:

   # dash -c 'sleep 1&sleep 1&jobs|wc -l'
   0

afaics, this is not documented behaviour, and other utilities (kill, alias) seem
to work fine.

bash does allow the output of jobs to be parsed:

   # bash -c 'sleep 1&sleep 1&jobs|wc -l'
   2

I think the bash behaviour is more useful for shell programming, and
probably correct, as the sus does not seem to indicate that jobs should
have no output in this case.

-- System Information:
Debian Release: 12.5
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 
'stable'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 
'oldstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, x32

Kernel: Linux 6.6.15-amd64 (SMP w/28 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_USER, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dash depends on:
ii  debianutils  5.7-0.5~deb12u1
ii  dpkg         1.21.22
ii  libc6        2.36-9+deb12u4

dash recommends no packages.

dash suggests no packages.

-- debconf information excluded

Reply via email to