Ampersand at the beginning of a line in csh
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.
Solution 1:
It's backgrounding "nothing". The ampersand also functions as a command delimiter like ;
.
You'll find that
; echo 'hi there'
does (in this case) essentially the same thing.
These, however, are different:
sleep 10 ; echo 'hi' & echo 'there'
sleep 10 ; echo 'hi' ; echo 'there'