I'm working on a small shell script that will assist in creating other
scripts.  Here is what I have thus far:

#!/bin/sh

if (test -z $1)
then
   echo "Usage:  scriptcreate <filename>"
else
   touch $1
   chmod +x $1
   vi $1
fi


I'm fairly new to shell scripting, so I don't really know my way
around yet.  I want to be able to check the extension of the file and
insert the proper common information into the created file.  For
example, if the filename specified ends in ".pl" I want to "echo
#!/usr/bin/perl -w  >> $1" right before the vi line.  I want to be
able to do this with multiple types of scripts, but I don't know how
to phrase my inquiry to search Google....




To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be 
removed. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/LINUX_Newbies/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to