Search Results

Search: Posts Made By: ruby_sgp
1,861
Posted By zaxxon
The phrasing sounds like classroom stuff. You got...
The phrasing sounds like classroom stuff. You got a PM how and where to post classroom stuff - closed.
1,500
Posted By danmero
Shorter ;) awk...
Shorter ;)
awk '{i=$NF;split(i,a,"/");if(a[1]!=a[2]){l=2}else{if(!b[$1]){b[$1]=1;c[$1i]=i};l=((c[$1i]==i)?1:3)}{$0=$0l}}1' file

ID1 a1 a/b 2
ID1 a10 a/b 2
ID1 a2 ...
1,500
Posted By panyam
Something like this: awk ' NR==1 { ...
Something like this:


awk '
NR==1 {
if(substr($3,1,1)==substr($3,3,1))
{
f=$1;co=0;$4=1;c1=substr($3,1,1);print;a[c1]=1;next
}
else
...
Showing results 1 to 3 of 3

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