Search Results

Search: Posts Made By: RavinderSingh13
3,186
Posted By RavinderSingh13
Hello kshitij, Adding a detailed level...
Hello kshitij,

Adding a detailed level explanation for my code.


awk ' ##Starting awk program from here.
FNR==NR{ ##Checking condition...
3,186
Posted By RavinderSingh13
Hello kshitij, Could you please try...
Hello kshitij,

Could you please try following.


awk '
FNR==NR{
if($0~/^[0-9]+/){
++count
}
sum[count]+=$NF
next
}
/^[0-9]+/{
print $0,sum[++var]
next
}
1
' ...
Showing results 1 to 2 of 2

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