[Techtalk] shell scripting

Emma Jane Hogbin emmajane at xtrinsic.com
Mon Feb 10 21:14:22 EST 2003


I think this is still within the mail size limits...

On Tue, Feb 11, 2003 at 12:59:17AM +0000, Maria Blackmore wrote:
> Assuming the use of bash, and that you're running a shell script (ie
> starts with #!/bin/bash) then it doesn't need to all be on the same line

Yup and yup.

> you may also like to know that the exit code from the last command run
> usually ends up in $?.  eg: 
> 	mariab at tigger:~$ echo $?
> 	0
> 	mariab at tigger:~$ ls foo
> 	ls: foo: No such file or directory
> 	mariab at tigger:~$ echo $?
> 	1

I see that it does that, but I don't understand what I'm looking at...

Here's the updated shell script. Thanks everyone. :)

#!/bin/bash
echo "starting htdig script... please be patient";

echo "starting french dig"
/usr/bin/htdig -i -c /etc/htdig/fr.conf -s -v > /home/emma/dig.09.txt;
echo "french dig complete";

echo "starting french merge";
/usr/bin/htmerge -c /etc/htdig/fr.conf -s -v > /home/emma/merge.09.txt;
echo "french merge complete";

echo "starting french accent database creation"
/usr/bin/htfuzzy -c /etc/htdig/fr.conf accents; 
echo "french accents complete";

echo "starting english dig"
/usr/bin/htdig -i -c /etc/htdig/en.conf -s -v > /home/emma/dig.09b.txt;
echo "english dig complete";

echo "starting english merge"
/usr/bin/htmerge -c /etc/htdig/en.conf -s -v > /home/emma/merge.09b.txt;
echo "english merge complete";

# this perl program CANNOT be run from this directory
# it must be run from the html directory
cd html
/etc/htdig/html/template.pl

echo "templates made"
echo "programme complete";


I like having the echos. It drives me nuts to watch a blank screen for the
45 minutes it takes to do the crawls.


-- 
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]



More information about the Techtalk mailing list