[ale] A bash question

Chuck Payne terrorpup at gmail.com
Wed Sep 16 18:06:53 EDT 2009


Guys,

Sorry I am still a bit of NOOD on programmer and scripting. I have
several boxes but a couple aren't SUSE, so iptables in not in
/usr/sbin/iptables, I like to set up a VAR called $IPT can I do this,
it a bash script...

IPT=" if [ -e /sbin/iptables ] ; then
              /usr/sbin/iptables
              "
Or

if [ -e /sbin/iptables ] ; then
          IPT="/sbin/iptables"
else
          IPT="/usr/sbin/iptables"
fi


I am looking for best practise. Thanks.
-- 
----------------------------------------
Discover it! Enjoy it! Share it! openSUSE Linux.
-----------------------------------------
openSUSE -- http://en.opensuse.org/User:Terrorpup
openSUSE Ambassador
openSUSE Member
skype -- terrorpup
twitter -- terrorpup
friendfeed -- http://friendfeed.com/terrorpup

Come join me at the Atlanta Linux Fest, September 19th, 2009
http://atlantalinuxfest.org/.


More information about the Ale mailing list