why red echo does not return '2' while green one does?
$ unset C
$ { ls missing 2>&1;C=$?; }
ls: 0653-341 The file missing does not exist.
$ echo $C
2
$ unset C
$ { ls missing 2>&1;C=$?; }|sed s/^/error:\ /g
error: ls: 0653-341 The file missing does not exist.
$ echo $C
$
just want someone confirm there is no error in my micro awk code below
* if given on "f" not exists in input, then print not exists
* if given on "f" exists and given on "s" is greater than number in file a, print 'too small'
$ cat a
200 /f1
300 /f2
500 /f4
$ awk -vf=/f5 -vs=400 'BEGIN {c=0}...
hi
expected is to print single 'obsolete' or single 'input error' text (when conditions are met), but for the first if condition print (in this example):
1 3 fields, a>10
2 3 fields, a>10
what is wrong with "exit" in code below?
# echo "a b c\na b c"|awk -va=11 '{if (NF==3&&a>10) print NR,NF"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.