[Nottingham] AAaaargh! Bash and & and ; and () ...

Martin martin at ml1.co.uk
Tue Jan 24 20:41:13 GMT 2006

After some very convoluted lost hours:

I've likely rediscovered what many already know in that bash gets 
awfully confused when you try "&" at the end of a line with bracketed 
multiple commands and ";"!

All on one line and things fail.
Spread out onto one instruction per line (no ";" anywhere) so that you 
get a final ") &" all on its own and all works fine.

I suspect that "()" or "{}" don't always protect the ";" effects.

Time to try zsh I think!

(OK, so there's also some file redirection and pipes implicated also.)


(Sorry for the noise but that might be a useful bash tip for someone!)

Martin Lomas
martin at ml1.co.uk

More information about the Nottingham mailing list