Search Results

Search: Posts Made By: Vavad
2,193
Posted By agama
For completeness, mods to my original suggestion...
For completeness, mods to my original suggestion to print all matching data on one physical line.


sort data* | awk -v expect=6 '
function p( ) # print them if there was one in each...
2,193
Posted By Chubler_XL
OK this version will only print if ID is in ALL...
OK this version will only print if ID is in ALL supplied files:

awk -F"\t" 'FNR==1{F++}{A[$1]++}
{O[$1]=(($1 in O)?O[$1] FS:$1 FS)$2 FS$3 FS$4}
END{for(i in O) if(A[i]==F) print O[i]} '...
2,193
Posted By Chubler_XL
Assumption is first column in unique within each...
Assumption is first column in unique within each file (ie no duplicate readings), and you want to print Ids that appear in 3 or more of the 6 files (ie if ID appears in file 1,2 and 6 it should be...
2,193
Posted By agama
If order is not important, then this should work:...
If order is not important, then this should work:

(You may need to list each data file on the command line; I assumed something like data_files.* would list all 6)


sort data_files.* | awk -v...
Showing results 1 to 4 of 4

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