Re: [Patch] remove useless return value checks in testing scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Américo Wang wrote:
> foo
> [ "$?" == "0" ] || bar
> 
> can be replaced by:
> 
> foo || bar

That's a pet peeve of mine:
http://www.pixelbeat.org/programming/shell_script_mistakes.html

thanks,
Pádraig.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux