[ale] A bash question
Chuck Payne
terrorpup at gmail.com
Wed Sep 16 19:08:59 EDT 2009
On Wed, Sep 16, 2009 at 6:50 PM, Tim Watts <timtw at earthlink.net> wrote:
> The 2nd is more typical form. The 1st doesn't really work.
>
> What about using a symlink to one dir or the other?
>
>
> On Wednesday 16 September 2009 6:06:53 pm Chuck Payne wrote:
>> 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.
>
> --
> If I were two-faced, would I be wearing this one?
> -- Abraham Lincoln
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>
I have used the second way, I thought there was a way to test and if
it fail, you could use the other without else.
Thanks guys.
--
----------------------------------------
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