What does an ampersand at the beginning of a line do in csh? It seems to be ignored (with no error message), but why?
& echo 'hi there'
performs the expected echo with no error message.
It's backgrounding "nothing". The ampersand also functions as a command delimiter like
You'll find that
does (in this case) essentially the same thing.
These, however, are different:
It behaves this way because that's how the implementors of CSH decided it should be treated.
Seems like the csh family shells behave like this while the Bourne family of shells throw an error (since it is likely to be an input error)