Forgot to send to the list.
----- Original message -----
From: Greg Reagle <[email protected]>
To: Marcin Zajączkowski <[email protected]>
Subject: Re: [Fish-users] Problem with -n in a conditional statement
Date: Tue, 11 Nov 2014 17:44:37 -0500
On Tue, Nov 11, 2014, at 05:29 PM, Marcin Zajączkowski wrote:
> The next problem I encounter is how to check two variables in one if
> statement.
There are several ways of doing this. Here is one:
set -q $COLUMNS $LINES; if test $status = 2; echo both defined; end
Note that this means that the man page for set is incorrect. It
currently says "exit status is the number of variables specified that
were not defined", but it the way it actually behaves for me is "exit
status is the number of variables specified that were defined".
--
http://www.fastmail.fm - Same, same, but different...
--
http://www.fastmail.fm - Or how I learned to stop worrying and
love email again
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users