i have a little problem, i want match the complete field ($1 or $2) with a complete word in another variable.
example:
i have a file with either one or two words per lane:
and want search each word in the file with each line if this word is present.
my try to use match, i.e.
with $1,$2 both words per lane and i the complete lane, was not possible, because 'hsa-mir-470' also matches 'hsa-mir-4707'. how can i match only the complete field with complete words in the variable?
can i tell awk that only the complete $1 should match a complete word in i.
something like
or
- both not working...
I am trying to look for $2 of file1 (skipping the header) in $2 of file2 (skipping the header) and if they match and the value in $10 is > 30 and $11 is > 49, then print the line from file1 to a output file. If no match is foung the line is not printed. Both the input and output are tab-delimited.... (3 Replies)
Hi Team,
I have two strings like:
xxx|yyy|Arizona Cardinals| Tell Cardinals | Cardinals
bbb|Bell Earn, Jr | Bell Earn | Jayhawks | hawks
I have a lookup file which has a set of strings. These need to be removed from above two strings
Lookup file Contents:
Bell Earn, Jr
hawks... (2 Replies)
Hello,
I was hoping someone could help me with this work related problem...
basically what I want to do is the following:
file2:
1 o
2 t
4 f
5 v
7 n
8 e
10 a
file1:
1 : (8 Replies)
First, thanks for the help in previous posts... couldn't have gotten where I am now without it!
So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following:
If $1... (4 Replies)
hi,
awk -F ";" '{if($10>500) then i++; } END{print i}' event_file_FR12_202_24-11-2009_* | less
How to modify and add to this above to print the complete line in less
ex :
4712714002021527;15298888;241129 095614... (1 Reply)
Hi All,
Thanks for your help in advance
I am parsing a log file where the first field of each line can have the same key value but not more than 3 times in a row. Varying value of that first field changes as you go through the log but it either appears 3 times or two and sometimes only once.... (1 Reply)
I would like to do the following in bash shell.
file a
a:1
b:2
c:3
file b
a:work:apple
b:baby:banana
c:candy:cat
d:desk:dog
I would like to match field 1 in file a to file b, if there's a match I would like
to append field 2 in file a to field 3 in file b.
Thank you. (8 Replies)
hi, I have a file.....
1|3|4|5|6
1|3|4|4|5
now i ahave to search for value 4 in forth field and write that output to a file.
if i do grep 4 file1 both lines are coming to output.
can somebody help me building command.
thanks and regards
sandeep (4 Replies)