Search Results

Search: Posts Made By: Mary James
2,586
Posted By sdf
It depends on what you want to select. If you...
It depends on what you want to select. If you want only those rows of file1 where field 1 is in file2 than use:

awk 'BEGIN{FS="|"}NR==FNR{a[$1]=$1;next}a[$1]' file2 file1 >selected_lines

If...
1,220
Posted By Franklin52
Try this: awk...
Try this:
awk 'NR==FNR{a[$1];next}!(substr($0,1,5) in a)' file2 file1


Use nawk or /usr/xpg4/bin/awk on Solaris.
2,395
Posted By mukeshguliao
awk -F, '!a[$1,$2,$3]++' UnixEg.dat i...
awk -F, '!a[$1,$2,$3]++' UnixEg.dat


i tried above, but got an error
a[$1,$2,$3]++': Event not found






guess could be beacause of ! . escaped by \

awk -F, '\!a[$1,$2,$3]++'...
Showing results 1 to 3 of 3

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