[sclug] Bash scripting help needed

Keith Edmunds kae at midnighthax.com
Tue Apr 21 20:50:17 UTC 2009


On Tue, 21 Apr 2009 20:30:30 +0100, haughtonomous at googlemail.com said:

> if ["$1" -eq ""]; then

One more thing. "-eq" is the numeric comparison operator; for strings you
need "=" (or "=="). This isn't causing you a problem in this script, but
it can introduce subtle bugs in scripts (BTDTGTTS).



More information about the Sclug mailing list