10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
2. Shell Programming and Scripting
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)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
Hi,
Need help on grep for a particular match.
cat testfile
xx.xx.xx.xx:/share4 /nfsshare15 nfs defaults yes no
xx.xx.xx.xx:/share5 /nfsshare15/sharedir1 nfs defaults 0 0
xx.xx.xx.xx:/share6 /nfsshare15/sharedir2 nfs defaults 0 0
Scenario... (6 Replies)
Discussion started by: sumanthupar
6 Replies
4. Shell Programming and Scripting
Trying to match $2 in original_targets with $2 of new_targets . If the two numbers match exactly then a match.txt file is outputted using the information in the new_targets in the beginning 4 fields $1, $2, $3, $4 and value of $4 in the original_targets . If there is "No Match" then a no... (2 Replies)
Discussion started by: cmccabe
2 Replies
5. UNIX for Dummies Questions & Answers
I have a need to grep a large number of files, but only display the first result from each file. I have tried to use grep, but am not limited to it. I can use perl and awk as well. Please help! (9 Replies)
Discussion started by: dbiggied
9 Replies
6. Shell Programming and Scripting
Hello Everyone ,
I have two files. I want to pick line from file-1 and match with the complete data in file-2 , if there is a match print all the match lines in file 3. Below is the file
cat test1.txt
vikas
vikasjain
j ain
testt
douknow
hello@vik@
# 33
||@@ vcpzxcmvhvdsh... (1 Reply)
Discussion started by: mailvkjain
1 Replies
7. Shell Programming and Scripting
I want to search a bunch of files and list only those containing a minimum number of pattern matches. So if I want to identify files containing 3 (or more) instances of the pattern "said:" and I have file1 that contains the lines:
He said:
She said:
and file2 that contains the lines:
He... (3 Replies)
Discussion started by: stumpyuk
3 Replies
8. Shell Programming and Scripting
Here is the sample of my file address.txt
Address 1
1234 Drive way
New Orleans, LA
Zipcode :- 12345
Address 2
4567 Spring way
Chicago, IL
Zipcode :- 67890
I would like to grep for an Address title (Ex :- Address 2) , then get its zipcode and echo both in a single line. Ex :- ... (3 Replies)
Discussion started by: leo.maveriick
3 Replies
9. UNIX for Dummies Questions & Answers
hi,
i'm having problem like this.
i wish to grep some keyword from certain files in one directory.
let's say i have a lot of files in my directory with the name of file.1 file.2 file.3 ...... file.500
i only wish to grep the keyword from file.20, file.21, file.23 .... file.50
i tried... (5 Replies)
Discussion started by: rei
5 Replies
10. Shell Programming and Scripting
I am writing the below script to do a grep and count number of occurances between two tab delimited files.
I am trying to achieve..
1) Extract column 2 and column 3 from the S.txt file. Put it in a temp pattern file
2) Grep and count column 2 in D.txt file
3) Compare the counts between... (19 Replies)
Discussion started by: madhunk
19 Replies