[Techtalk] Shell scripting for newbies

Deanne Fountaine dkf at cyberus.ca
Thu Feb 19 12:14:39 EST 2004


Hi all,

I'll start with a little brag: I configured shorewall (by editing the 
config files manually) to poke a hole through my Mandrake 9.2 server for 
overnet. :)

Not a big deal for many, I know, but huge for me.

On to the next challenge: I'm using Thunderbird for my email, but I have 
to copy and paste links into my browser instead of just clicking on them 
in the emails. There's a manual workaround, but I know zip about shell 
scripts, except for Jenn's excellent "Hello World" introduction on irc 
this am.

Here's a suggested script from 
http://www.mozilla.org/projects/thunderbird/linuxurls.html:

#!/bin/sh

export MOZILLA_FIVE_HOME=/opt/firebird-builds/current
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MOZILLA_FIVE_HOME

# get URL to load
url=$1; [ -z $url ] && url=about:blank

# try xremote first
$MOZILLA_FIVE_HOME/mozilla-xremote-client openURL\($url\) && exit 0

# if xremote failed, then launch the browser
exec $MOZILLA_FIVE_HOME/MozillaFirebird $url

<end script>
Would someone be so kind as to dissect that for me? I plan on going 
through the great scripting guide at 
http://www.tldp.org/LDP/abs/html/index.html but in the meantime, I think 
I could learn quite a bit just by having this explained to me.

Thanks in advance!
Deanne

(dea in #linuxchix)


More information about the Techtalk mailing list