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

I have a tcsh script that sets aliases during login. It seems like the last line in the file is not executed. If I put a new line after it - it works fine.

Example - bad:

alias psu 'ps -fu ${LOGNAME}' <-- This does not run!!!

Example - good:

alias psu 'ps -fu ${LOGNAME}' <-- This runs fine!!!
--> Empty line here

Any idea why?

share|improve this question
up vote 1 down vote accepted

Because tcsh needs a CR character at the end of the line to execute the command, which is missing in your first example. Just end every line in a shell script with the enter key to be on the safe side.

share|improve this answer

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.