How about:<br><br>if [ -n "$STICK" -a -n "$STATUS" ]; then<br>
              /sbin/ifup ppp0<br>
fi<br>
<br><div class="gmail_quote">On Wed, Apr 7, 2010 at 8:21 PM, Lori Paniak <span dir="ltr"><<a href="mailto:ldpaniak@fourpisolutions.com">ldpaniak@fourpisolutions.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear very clever list,<br>
<br>
I am trying to write a simple bash script to (re)start a process given<br>
the logical "and" of two conditions.  I think it should look like this:<br>
<br>
if [ -n "$STICK" ] && [ -n "$STATUS" ]; then<br>
              /sbin/ifup ppp0<br>
fi<br>
<br>
When STICK and STATUS are non-empty strings I would like ifup to run.<br>
This works if I just use one condition, but I cannot figure out the<br>
correct syntax for the AND-ed case.  I've tried (seemingly) all<br>
combinations and locations of brackets without success.<br>
<br>
Anyone out there care to point out my trivial error(s)?<br>
<br>
Thanks!<br>
<font color="#888888">Lori<br>
</font><br>_______________________________________________<br>
<a href="http://kwlug-disc_kwlug.org" target="_blank">kwlug-disc_kwlug.org</a> mailing list<br>
<a href="http://kwlug-disc_kwlug.org" target="_blank">kwlug-disc_kwlug.org</a>@<a href="http://kwlug.org" target="_blank">kwlug.org</a><br>
<a href="http://astoria.ccjclearline.com/mailman/listinfo/kwlug-disc_kwlug.org" target="_blank">http://astoria.ccjclearline.com/mailman/listinfo/kwlug-disc_kwlug.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>