Forgot to send to the list.

----- Original message -----
From: Greg Reagle <greg.rea...@umbc.edu>
To: Marcin Zajączkowski <msz...@wp.pl>
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
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to