Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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'
share|improve this answer

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)

share|improve this answer
But what's the logic of it? – JoelFan Feb 23 '10 at 16:58
See Dennis's answer for the 'logic' of it. – MikeyB Feb 24 '10 at 2:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.