GNU bash: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
-n string
No edit summary
 
Line 1: Line 1:
== Safe bash ==
{| class="wikitable"
!Command
!Comments
|-
|set -o pipefail
|returns error if the pipe fails
|-
|set -e
|exit on the first program fail
|}
== test or [ <ref>http://tldp.org/LDP/abs/html/fto.html</ref><ref>http://tldp.org/LDP/abs/html/comparison-ops.html</ref> ==
== test or [ <ref>http://tldp.org/LDP/abs/html/fto.html</ref><ref>http://tldp.org/LDP/abs/html/comparison-ops.html</ref> ==
{| class="wikitable"
{| class="wikitable"

Latest revision as of 00:20, 12 February 2018

Safe bash

Command Comments
set -o pipefail returns error if the pipe fails
set -e exit on the first program fail

test or [ [1][2]

Command Comments
-d file file is a directory
-n string the length of string is nonzero
string1 != string2 string1 and string2 are not equal

References