This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: #!/bin/sh and #!/bin/bash is not the same
Please do not TOP POST.
On 8/22/2016 10:36 AM, Morten Kjærulff wrote:
> Thanks.
>
> What I was actually trying, was this:
>
> echo a | while read ; do
> some_command &
> done
> wait
>
> The "wait" did not wait. I guessed the reason was that "some_command
> &" was executed in a subshell.
>
> So I tried:
>
> while read ; do
> some_command &
> done < <(echo a)
> wait
>
> It was working, however not with #!/bin/sh
>
What does ``/bin/sh --version'' print?
The wait command is a shell internal command, there is no external
equivalent. If you /bin/sh is bash then perhaps you've found a bug in
the emulation of /bin/sh in bash. Bash takes a different code path when
named sh.
--
cyg Simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple