Shell Script Notes
Shell Script Notes
1/4/2004 Copyright 2004 Jon Herlocker 1 1/4/2004 Copyright 2004 Jon Herlocker 2
1/4/2004 Copyright 2004 Jon Herlocker 3 1/4/2004 Copyright 2004 Jon Herlocker 4
WHILE Publish.sh
while command-list1 • Powerpoint saves a presentation as
– An root html file
do – A directory of support files (images)
command-list2 • Example (ch1.ppt):
done – ch1.htm
– ch1_files
• Publish them
– Copy them to web directory
– Set permissions appropriately
1/4/2004 Copyright 2004 Jon Herlocker 11 1/4/2004 Copyright 2004 Jon Herlocker 12
# destination=/mywebdir
destination=/tmp if test ! -f $html_file
then
if test $# -ne 1
then echo "File \"$html_file\" does not exist"
echo "Wrong number of parameters" exit 1
echo $usage
exit 1 fi
fi
1/4/2004 Copyright 2004 Jon Herlocker 19 1/4/2004 Copyright 2004 Jon Herlocker 20
cp thesis.doc
cp thesis.doc thesis_current.doc
thesis_current.doc
rm thesis.doc
rm thesis.doc
1/4/2004 Copyright 2004 Jon Herlocker 31 1/4/2004 Copyright 2004 Jon Herlocker 32