Search Results

Search: Posts Made By: hankyo
24,180
Posted By Chubler_XL
Try: printf -v num "%0.2f" $n
Try:

printf -v num "%0.2f" $n
54,809
Posted By Scrutinizer
ksh93: if (( 12.14>12.13 )); then echo greater;...
ksh93:
if (( 12.14>12.13 )); then echo greater; fi
bash:
if (( $(bc <<< "12.14>12.13") > 0 )); then echo greater; fi
posix:
if [ $(echo "12.14>12.13"|bc) -gt 0 ] ; then echo greater; fi
3,206
Posted By ghostdog74
(g)awk awk -F. 'length($2)==6{t++}END{print...
(g)awk

awk -F. 'length($2)==6{t++}END{print t}' file
3,206
Posted By vgersh99
nawk -F. '{if (length($2)==6) s++}END{print s}' ...
nawk -F. '{if (length($2)==6) s++}END{print s}' myFile
7,783
Posted By Don Cragun
Reformatting Scrutinizer's code and adding...
Reformatting Scrutinizer's code and adding comments:
awk ' # invoke awk program and start script to be run by awk
/Output view:/ {# When an input line contains the string "Output...
7,783
Posted By Akshay Hegde
One more lengthy way may try $ awk...
One more lengthy way

may try

$ awk 'BEGIN{while(1){getline;if(/Output/){printf $0;break}x=x RS $0}print x}1' fileOR
$ awk '{if(/Output/)printf $0;else x=x RS $0}END{print x}' fileResulting...
28,155
Posted By era
And the backticks don't fit that definition? ...
And the backticks don't fit that definition?

Anything you can do in a script, you can do on the command line, anyway.

For the general solution, xargs is probably closest to what you have in...
Showing results 1 to 7 of 7

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