All Questions
11
questions
1
vote
2
answers
848
views
Is it possible to use grep or awk to report duplicate output lines corresponding to repeating entries in an index file?
I can't seem to get either grep or awk to do a relatively simple index pull of a list. I suspect it's because of adjacent duplicates in the index file, something I wouldn't have thought would cause an ...
-1
votes
2
answers
67
views
Join two csv + first File fist colum + second file first column and take only match column data [closed]
file1.txt
name
abc
xyz
pqr
file2.txt
name,addr,id
abc,hj,1
pqr,hj.2
jkd,hj,9
jh,jd,2
output file
name,addr,id
abc,hj,1
pqr,hj.2
1
vote
3
answers
136
views
Grep not returning identical matches from awk pipe
I'm trying to identify all lines in common based on the first column of one file. I'm using the following command:
awk '{print $1}' File1 | fgrep -wf - File2 >Out
File1:
M01605:153:000000000-...
2
votes
1
answer
1k
views
Merging two CSV compared by a specific column only
I want to compare two CSV files with the following format. They not have headers. I want to compare them by a specific column (in this case, the 2nd one).
The source CSV files around 4-5GB, so ...
1
vote
3
answers
307
views
Elegant way of counting how many times patterns from a file occur in another file
Imagine that we have two for example files. The first file is filled with unique names of employees created by combining the first two characters of the first name and the last 2 characters of the ...
1
vote
1
answer
111
views
Comapring columns in 2 files and printing the values that differ
I have a file (file-1) that looks like this,
DIP-10097N|refseq:NP_416170|uniprotkb:P30015
DIP-10117N|refseq:NP_414973|uniprotkb:P08177
DIP-10168N|refseq:NP_418766|uniprotkb:P15005
DIP-10199N|refseq:...
4
votes
3
answers
36k
views
comparing the first column of two files and printing the entire row of the second file if the first columns match
I have two files in these formats:
file1 :
air
smell
hand
dude
road
cat
file 2:
air,4,21,01,13,3,2
smell,21,4,2,5,6
dude,1,31,42,1
road,1,4,2,1,4
cat,1,5,6,3,1
hand,1,4,2,1,6
mouse,1,3,5,6,2
...
3
votes
1
answer
75
views
comparing 2 lists with additional data to be printed
I have a file lets say file1.txt
ENSG00000223116 AL157931.1
ENSG00000233440 HMGA1P6
ENSG00000207157 RNY3P4
ENSG00000229483 LINC00362
ENSG00000252952 RNU6-58P
I have another file say file2....
4
votes
3
answers
5k
views
Using grep/awk/sed to sort and combine 2 files
I am taking a wifi log that has MAC addresses listed in it. I want to find out what MAC vendors/manufacturers for the devices that are connected to my router. I have 2 files, one with the MACs already ...
1
vote
3
answers
2k
views
Compare first column in different files [closed]
I want to compare one file with other files in the same directory.
file1.txt contains:
move 34#123#
get 11#278
put 33#29#567#23
file1.txt should compare with files 1.txt and 2.txt.
1.txt ...
1
vote
6
answers
15k
views
compare two files get identical list
file1.txt (50 lines)
TERYUFV00000010753
TERYUFV00000009526
file2.txt (500 lines)
TERYUFV00000009526 refids_739_known_8/10_target
TERYUFV00000018907 refids_12023_known_21/22_target
...