"The shell you type your commands in, tcsh, is unfortunately rather brain-dead at scripting (see http://www-uxsup.csx.cam.ac.uk/misc/csh.html for the gory details). If we were not astronomers I'd advise everyone never to touch tcsh/csh with a bargepole (indeed I still do...), but I'm afraid we're stuck with it for historical reasons. If you understand what you're doing you might want to look at bash, but otherwise stick with tcsh, and use a better scripting language (like Perl or Python if you need to do more).
The possible options for writing a script or programming are:
- We write the script in tcsh. We have to step around all the horrible problems with csh/tcsh. You can do this for simple scripts, but doing anything slightly more complex feels like your brain is sucked out through your nose, but fortunately we live to tell our tale to the others in the sanatorium between the nightmares.
- We write the script in a good shell like bash. This has a lot going for it, but unfortunately we don't get access to all the aliases that setup scripts for the astronomical packages provide. Aliases are also a brain-dead way of providing commands in the shells without doing properly. That's what you get when you ask astronomers to write software packages without giving them training. I'm told to advise you against bash, as few other astronomers know what you're talking about.
- We write in a much more featureful scripting language like Python or Perl. We also don't get the the aliases that the setup scripts provide, but we can write much more complex programs that can do proper maths. I'll cover scripting languages briefly elsewhere.
- We can write a script in a proprietary language like IDL or Mathematica. Can be simple and powerful but be aware that people you might want to give your code to won't have the cash to buy these expensive programs to run your simple script (don't laugh - I know one astronomer who writes all his simple scripts in IDL, so no one else uses them). People won't always have IDL or Mathematica on their laptops.
- We can write in a fully-fledged programming language (not a scripting language) like C, Fortran or C++. Typically it is harder to write a program in these languages but it will run more quickly than the above options. This is necessary if you need to do lots of calculations. I'll cover programming elsewhere.
- If we are a hardcore masochistic nut, we can code in raw binary by flipping bits on a disk with a magnet. We would also be able to tell our exciting life story to those guys who are putting us in that nice soft room.