Hallo,
I have searched the forum, but i have not found the answer to this little problem.
I have the following comma seperated Inputfile with a fix fieldnumber of 5:
19/100,aaa,123,wert,bluebird.dgn
19/100,aaa,123,wert,bluebird.oce
19/100,aaa,123,wert,bluebird.tif
19/121,a3e,144,zzzz,coffehou.dgn
19/231,er4,444,53zr,fingercl.pdf
19/649,2tt,gt6,gt67,streetwa.dgn
19/699,bbb,ggg,jjjj,highway1.dgn
19/699,bbb,ggg,jjjj,highway1.tif
...
I want to receive the output below:
19/100,aaa,123,wert,bluebird.dgn,wert,bluebird.oce,wert,bluebird.tif
19/121,a3e,144,zzzz,coffehou.dgn
19/231,er4,444,53zr,fingercl.pdf
19/649,2tt,gt6,gt67,streetwa.dgn
19/699,bbb,ggg,jjjj,highway1.dgn,jjjj,highway1.tif
...
The uniq-key field is field 1.
You can see, that i want to delete the duplicate lines except one. Field 4 and 5 should be put at the end of the line.
Do you have any idea?
I am using windows and the awk.exe file.
Thx
I have searched the forum, but i have not found the answer to this little problem.
I have the following comma seperated Inputfile with a fix fieldnumber of 5:
19/100,aaa,123,wert,bluebird.dgn
19/100,aaa,123,wert,bluebird.oce
19/100,aaa,123,wert,bluebird.tif
19/121,a3e,144,zzzz,coffehou.dgn
19/231,er4,444,53zr,fingercl.pdf
19/649,2tt,gt6,gt67,streetwa.dgn
19/699,bbb,ggg,jjjj,highway1.dgn
19/699,bbb,ggg,jjjj,highway1.tif
...
I want to receive the output below:
19/100,aaa,123,wert,bluebird.dgn,wert,bluebird.oce,wert,bluebird.tif
19/121,a3e,144,zzzz,coffehou.dgn
19/231,er4,444,53zr,fingercl.pdf
19/649,2tt,gt6,gt67,streetwa.dgn
19/699,bbb,ggg,jjjj,highway1.dgn,jjjj,highway1.tif
...
The uniq-key field is field 1.
You can see, that i want to delete the duplicate lines except one. Field 4 and 5 should be put at the end of the line.
Do you have any idea?
I am using windows and the awk.exe file.
Thx