Search Results

Search: Posts Made By: astropi
6,536
Posted By bartus11
Try: if [ ! -f file ]; then echo "/path/.../"...
Try: if [ ! -f file ]; then
echo "/path/.../" >> bad.txt
fi
1,674
Posted By itkamaraj
nawk '{if($0>1){printf("%s\n",$0) >> "ok.txt"...
nawk '{if($0>1){printf("%s\n",$0) >> "ok.txt" }else{printf("%s\n",$0) >> "bad.txt"}}' inputfile
2,373
Posted By vgersh99
they're 2 diff implementations with diff...
they're 2 diff implementations with diff capabilities. I prefer using ksh for scripting and bash for the interactive sessions as ksh has been more widely available.

as ksh doesn't support the...
2,373
Posted By vgersh99
read a b < temp if [ "${a}" -le "${b}" ]; then ...
read a b < temp
if [ "${a}" -le "${b}" ]; then
echo OK
else
echo NO
fi
1,932
Posted By Corona688
external utilities like awk/cut/sed are efficient...
external utilities like awk/cut/sed are efficient when run on batches of data, but using them to operate on single lines is extremely wasteful. They take time to load and quit; imagine only being...
1,932
Posted By itkamaraj
x=$(awk '{print $2}' a) echo $x
x=$(awk '{print $2}' a)
echo $x
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 07:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy