Search Results

Search: Posts Made By: repinementer
1,590
Posted By alister
A minor tweak to radoulov's solution which fixes...
A minor tweak to radoulov's solution which fixes the 4th column:
awk 'p {
n = split(p, t)
if (t[n] == $NF)
print t[1], t[3], $2, ++i"I", t[5]
else
i=0
}
{ p = $0 }
' infile
1,590
Posted By radoulov
Untested: awk 'p { n = split(p, t) ...
Untested:

awk 'p {
n = split(p, t)
if (t[n] == $NF)
print t[1], t[3], $2, t[4], t[5]
}
{ p = $0 }
' infile
2,945
Posted By radoulov
awk '{ n11 = split($11, t11, ",") n12 =...
awk '{
n11 = split($11, t11, ",")
n12 = split($12, t12, ",")
for (i = 0; ++i < n11 - 1;) {
s12 = $2 + t12[i]
print $1, s12 + t11[i], $2 + t12[i + 1], i "_" $4
}
}' infile
Showing results 1 to 3 of 3

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