|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: C. Bensend (benny
bennyvision.com)Date: Thu Feb 01 2001 - 22:54:59 CST
Hey folks,
I'm hacking on a sh script, and my brain is being
held together via duct tape, bailing wire, and spit. It's
been a long day beating several IRIX and HP-UX boxes into
submission, please forgive my stupidity. And no, I don't
have a choice [in reguards to the IRIX and HP-UX stuff].
I'm simply trying to check for the presence of an
OpenBSD package - if it's installed, I need to skip the
download/installation of that package.
I tried:
if [ -e `which wget` ]; then
echo "wget already installed - skipping"
fi
... which works fine, IF the package is installed. If it
is not, it fails with (I'm just trying via commandline -
I thought that if the package is NOT installed, it would
simply output nothing):
[: too many arguments
What is the flaw in my logic?
Now is the perfect time to tell me how much of
an idiot I am. Any references to "common stupid mistakes with
shell scripts" URL's would be welcome, too.
Thanks, folks. :)
Benny, The Frustrated and Overtired
ps: OpenBSD 2.8, default install
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Windows has detected that a gnat has farted near your computer.
Press any key to reboot.
-- Simon Oke, on a.s.r
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]