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 10:53:52 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
Curt Duncan Taylor wrote:
> Here I am pulling my hair out because I can't find the proper suntax to 
> write an 'if' statement that says "if the file ~HOME\test.lis exist, 
> then delete it."
> 
> Where do I find documentation for the proper version of Unix scripting 
> that is being used on Girrafe at UVM?

There are several shell options available on giraffe.  What shell were 
you trying to use?

If you use bash, syntax like:


#!/bin/bash

TESTFILE=$HOME/test.lis

if [ -e $TESTFILE ]; then
         rm $TESTFILE
fi


will do the job.

mga.

ATOM RSS1 RSS2