[kwlug-disc] Outsmarted by bash && if
ldpaniak at fourpisolutions.com
Wed Apr 7 20:21:12 EDT 2010
Dear very clever list,
I am trying to write a simple bash script to (re)start a process given
the logical "and" of two conditions. I think it should look like this:
if [ -n "$STICK" ] && [ -n "$STATUS" ]; then
When STICK and STATUS are non-empty strings I would like ifup to run.
This works if I just use one condition, but I cannot figure out the
correct syntax for the AND-ed case. I've tried (seemingly) all
combinations and locations of brackets without success.
Anyone out there care to point out my trivial error(s)?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part
More information about the kwlug-disc