[GLLUG] Shell scripting weirdness
abc.mikey at gmail.com
Wed May 22 22:47:44 UTC 2013
Maybe this is of some interest:
On 22 May 2013 23:43, mikey <abc.mikey at gmail.com> wrote:
> Maybe this is of some interest:
> 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
>> GLLUG mailing list
>> GLLUG at mailman.lug.org.uk
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GLLUG