Thanks for the analysis. I'll consider the workaround you proposed and
see if I can think of any other options.
I believe running the shell builtin jobs in a subshell is a bug. Running
jobs in a new shell will never return any job information.
--
jobs command in dash doesn't work with pipes in s
I think that the problem here is that Dash is running “jobs | wc -l” and
“jobs | cat” in subshells. These subshells have no stopped jobs or running
background jobs to report, which is why the output of jobs is empty.
If in Dash you run:
sleep 10 &
jobs
you will get the output you are
I'm using a clean install of ubuntu 8.04.
dagger ~/job_count $ dpkg -s dash|grep Version
Version: 0.5.4-8ubuntu1
--
jobs command in dash doesn't work with pipes in scripts
https://bugs.launchpad.net/bugs/243406
You received this bug notification because you are a member of Ubuntu
Bugs, which is