On 2014-11-11 23:44, Greg Reagle wrote: > 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
Thanks Greg. The following works fine for me: if set -q COLUMNS LINES ... end (you probably accidentally put $ signs before `set` parameters) Marcin > 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". ------------------------------------------------------------------------------ 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