On January 31, 2005 16:53, RickSisler wrote:
...
> > I'm not sure if I'm hijacking this thread, but, for my interest, could
> > someone who does know explain what this script does/how it works?
> >
> > (It's the stuff in the [*] that isn't obvious to me...)
> >
> > Thanks,
>
> I'll take a stab  at it ..
>
> This is a bash builtin called test in [ ] .. man test for more.
>
> $? is the bash pre-defined variable that reports the error value of
> the last command
>
> -ne 0 ]  is not equal to 0 or zero, if you didn't already know,
>
> [ $? -ne 0 ] means, if the grep command fails, being not-equal to 0,
> so fetchmail is not running, then it will start fetchmail
>
> otherwise the grep command returns true or 0, with fetchmail
> running, then skips starting it again.
>
> use konqueror for info:bash to see the rest ..
>
> HTH

There's also a great intro to bash scripting at:

http://www.tldp.org/LDP/abs/html/index.html

-- 
Ron
ronhd at users dot sourceforge dot net

Opinions expressed here are all mine.

"As you know, necessity is the mother of invention.
I don't know who the father is. Remorse, I guess." - Red Green

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to