What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any error message.
What does an ampersand at the beginning of a line do in csh?
It seems to be ignored (with no error message), but why?
Example:
& echo 'hi there'
performs the expected echo without any 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 implementers of CSH decided it should be treated.
It 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).