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?
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.