don't forget that there are hundreds of shell scripts on your computer now: make search for shell scripts
i can email you a few simple beginner examples that i have done.
here's a bourne script that copies a file:
#!/bin/sh
trap 'echo "script ex3 interrupted"; exit' 2 #user of system kills script
# control number of arguments typed after command
# command is name of shell script file, which has to be executable
# ie chmod +x filename
if [ $# -ne 2 ]
then
echo "two arguments expected"
exit 1
fi
allowcopy=no; from=$1; to=$2
if [ -e $from ] # if file exists
then
if [ -e $to ]
then
answer=notgiven
while [ $answer = notgiven ]
do
echo " " $to " exists. replace? "
read wish # input from keyboard
case $wish in
y|Y)
answer=given
allowcopy=yes
;;
n|N)
answer=given
exit
;;
*)
echo "y or n please"
;;
esac
done
else
#the from file exists, the to file doesn't. copy from to
allowcopy=yes
fi
else
# the 'from' file doesn't exist. nothing to copy.
echo file $from " not found. exiting."
exit 1
fi
if [ $allowcopy=yes ]
then
cp $from $to
fi
a few useful things in this bash. hope it helps