Search Results

Search: Posts Made By: SEinT
12,757
Posted By Franklin52
Is this what you're looking for? awk '!len ||...
Is this what you're looking for?
awk '!len || length($1) > len {len=length($1)} END{print len}' file
2,853
Posted By matrixmadhan
Its not $1, its $0 - small change to what you...
Its not $1, its $0 - small change to what you have posted

awk -v l=0 'length($0)>l { l=length($0);rec=$0} END {print l," ", rec}' inputfile
2,853
Posted By pravin27
Could this help you? len=3 awk -v l=$len...
Could this help you?
len=3
awk -v l=$len 'length($1)>l { l=length($1);rec=$0} END {print l," ", rec}' inputfile
1,265
Posted By Franklin52
Something like this? awk -F:...
Something like this?
awk -F: '{$6=$3+$4+$5;total+=$6}END{print "Total = " total}1' OFS=":" file
Showing results 1 to 4 of 4

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