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
The purpose is to check if values for column 3 and 4 in file1 match with column 1 in file2.
If any value match do:
1) Replace values in file2 for column 2 and 3 using the information of file1 columns 5 and 6
2) Replace string ($1,1,5) and string ($1,6,5) in file2 with values of columns 7... (8 Replies)
Discussion started by: jiam912
8 Replies
3. Shell Programming and Scripting
Hi All,
I need some help trying to achieve the below but everything I've tried has failed, I have 2 files which i'm trying to carry out a match based on the first column from file 1, take that value find it in file 2 if found replace it with the second column from File 1
Lookup File: File 1... (3 Replies)
Discussion started by: mutley2202
3 Replies
4. Shell Programming and Scripting
Hi, I have a tab delimited text file like this one. I need to do a partial match of a particular cell and then replace matches with an empty cell. So here is a sample:
Smith FordMustang ChevroletCamaro
Miller FordFiesta
Jones KiaSorrento
Davis ChevroletCamaro
Johnson ToyotaHighlander
I... (4 Replies)
Discussion started by: mikey11415
4 Replies
5. 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
6. Shell Programming and Scripting
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
Discussion started by: invinzin21
2 Replies
7. Shell Programming and Scripting
Hi Friends,
This might sound a pure biological questions, but all help is highly appreciated.
I have a file with the following style
file1
>hg19_chr1_143_456_-
aaaaaaaaaaaaabbbbbbbbbbbcccccccccccccccddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffff... (7 Replies)
Discussion started by: jacobs.smith
7 Replies
8. Shell Programming and Scripting
I have a file containing a multiple lines of the format
sddfdsf_gaf/ywrtrtwrt_gaf
ghfghfgh_ert/xcvxcvcv_ert
werwerwwerw_adf/jkhjkhjkjhkjhk_adf
I am interested in only the first 3 letters following the "_" character and make those 3 letters uppercase after extraction. So would like to convert... (5 Replies)
Discussion started by: inditopgun
5 Replies
9. Shell Programming and Scripting
Hi All,
I am new to unix shell scripting, I need your help guys in coming up with some thing for the following scenario:
file1
ABC_BASE ${base}
ABC_ACC ${acc}
ABC_TEST ${test}
01-01-2006 ${from_dt}
01-15-2006 ${to_dt}
file 2
I have an file2.sql file which contains:
####This... (4 Replies)
Discussion started by: sol_nov
4 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I want to replace text 'DEF' for those files containing text 'ABC'.
I can only locate the files containing text 'ABC', but I don't know how to replace the text 'ABC' with 'DEF'.
I use the following command to locate the files containing 'ABC'
find . -exec grep -l 'ABC'... (1 Reply)
Discussion started by: wilsonchan1000
1 Replies