Curt Duncan Taylor wrote:
> Thanks. I'll try it!
>
> So then the question is - How do I know what scripting option I am
> using? I just create .shl files and run 'em.
If you are running them manually, and there is no #! at the beginning of
the script which defines what shell to use, you are using the shell of
your account, which is tcsh.
Since different shells have different syntax, every shell script should
have a #! at the beginning to define the shell you intend to use.
> And the quest for documentation remains. . .
I'm not sure if AIS has documentation about this. But you can get shell
scripting information on the web (non-uvm). Examples for bash:
http://db.ilug-bom.org.in/Documentation/abs-guide/http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
I keep recommending bash because it's syntax is far nicer than tcsh.
csh/tcsh info:
http://www-uxsup.csx.cam.ac.uk/misc/csh.html
There are probably better ones if you really want to use tcsh...
You could do your test/remove in tcsh like this:
#!/bin/tcsh
set TESTFILE=$HOME/t/test.shl
if ( -e $TESTFILE ) then
/bin/rm $TESTFILE
endif
mga.