[GLLUG] Shell scripting weirdness
mikey
abc.mikey at gmail.com
Wed May 22 22:47:44 UTC 2013
Maybe this is of some interest:
http://unix.stackexchange.com/questions/71205/background-process-pipe-input
Regards,
Michael
On 22 May 2013 23:43, mikey <abc.mikey at gmail.com> wrote:
> Maybe this is of some interest:
> http://unix.stackexchange.com/questions/71205/background-process-pipe-input
>
> Regards,
>
> Michael
>
>
> On 22 May 2013 22:11, Robert McKay <robert at mckay.com> wrote:
>
>> Greetings fellow Lugites,
>>
>> I was wondering if anyone knows why these two commands behave differently;
>>
>> bash -c "cat & wait"
>> bash -c "cat <&0 & wait"
>>
>> The first just exits right away. The second one does what I
>> wanted/expected the first one to do.
>>
>> also when running the same bash shell in sh-compat mode;
>>
>> sh -c "cat <&0 & wait"
>>
>> it behaves like the first one and on a ksh shell "(cat & wait)" by itself
>> worked.. unfortunately I don't have the exact version of ksh handy and my
>> attempts to repeat that one here have failed.
>>
>> The problem I was actually trying to solve has already been dealt with
>> and this is a simplified demonstration of what I was actually doing - it's
>> just been annoying me all afternoon as I couldn't see why they should
>> behave differently.. other than just 'because' :p
>>
>> Cheers,
>> Rob
>>
>> ______________________________**_________________
>> GLLUG mailing list
>> GLLUG at mailman.lug.org.uk
>> https://mailman.lug.org.uk/**mailman/listinfo/gllug<https://mailman.lug.org.uk/mailman/listinfo/gllug>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20130522/1ee1ba3c/attachment.html>
More information about the GLLUG
mailing list