IT-DISCUSS Archives

June 2006

IT-DISCUSS@LIST.UVM.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Austin <[log in to unmask]>
Reply To:
Technology Discussion at UVM <[log in to unmask]>
Date:
Wed, 28 Jun 2006 11:42:45 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
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.

ATOM RSS1 RSS2