[Bug 15631] sleep command after '&' in a shell script has no effect

bugzilla at busybox.net bugzilla at busybox.net
Sat Jun 17 23:48:27 UTC 2023


https://bugs.busybox.net/show_bug.cgi?id=15631

--- Comment #1 from Manhong <manhongdai at gmail.com> ---
A workaround is to add a pair of parenthesis to the command that need to be in
the background. 


#!/bin/sh
for i in 0 1 2 3 4 5
do
        ( echo "Loop: $i" & )
        sleep 10
done

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list