Search Results

Search: Posts Made By: atzounis
2,498
Posted By pamu
Sorry for late reply.. But your previous...
Sorry for late reply..

But your previous sample and actual input file has lot discrepancies.

Try with this(not tested)

awk 'FNR==1{Y=Y?Y FS $0"-"FILENAME:$0"-"FILENAME;}...
2,498
Posted By pamu
just you need small modification... tried...
just you need small modification...

tried on two files, hope it shoud work fo all...


$ awk 'FNR==1{X[$1,$2,FNR]=X[$1,$2,FNR]?X[$1,$2,FNR] FS $3 "-" FILENAME : $0 "-" FILENAME}...
2,498
Posted By pamu
Try sth like this.. awk -F "|"...
Try sth like this..


awk -F "|" '{X[$1,$2]=X[$1,$2]?X[$1,$2] FS $3 "-" FILENAME : $0 "-" FILENAME}END{for(i in X){print X[i]}}' *.txt


As *.txtgive all your files as input.
Showing results 1 to 3 of 3

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