10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
I have 2 tab-delimited input files as follows.
file1.tab:
green A apple
red B apple
file2.tab:
apple - A;Z
Objective:
Return $1 of file1 if,
. $1 of file2 matches $3 of file1 and,
. any single element (separated by ";") in $3 of file2 is present in $2 of file1
In order to... (3 Replies)
Discussion started by: beca123456
3 Replies
2. Shell Programming and Scripting
Hi, I'm trying to use awk arrays to compare values across two files based on multiple columns. I've attempted to load file 2 into an array and compare with values in file 1, but success has been absent. If anyone has any suggestions (and I'm not even sure if my script so far is on the right lines)... (4 Replies)
Discussion started by: hubleo
4 Replies
3. Shell Programming and Scripting
Need Assistance . Using wget how can i download multiple files from http site. Http doesnt has wild card (*) but FTP has it . Any ideas will be appreciative.
wget --timeout=120 --append-output=output.txt --no-directories --cut-dirs=1 -np -m --accept=grib2 -r http://sample.com/... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
4. Shell Programming and Scripting
I have a csv dump from sql server that needs to be converted so it can be feed to another program. I already sorted on field 1 but there are multiple columns with same field 1 where it needs to be compared against and if it is same then append field 5.
i.e from
ANG SJ,0,B,LC22,LC22(0)
BAT... (2 Replies)
Discussion started by: nike27
2 Replies
5. Shell Programming and Scripting
Dear All,
I want to compare File1 and File2 (Separated by spaces) using four fields (Column 1,2,4,5).
Logic: If column 1 and 2 of File1 and File2 match exactly and if the File2 has the same characters as any of the characters present in column 4 and 5 of file1 then those lines of file1 and file2... (6 Replies)
Discussion started by: NamS
6 Replies
6. Shell Programming and Scripting
I want to compare File1 and File2 (Separated by spaces) using four fields (Column 1,2,4,5).
Logic: If column 1 and 2 of File1 and File2 match exactly and if the File2 has the same characters as any of the characters present in column 4 and 5 of file1 then those lines of file1 and file2 are... (1 Reply)
Discussion started by: NamS
1 Replies
7. Shell Programming and Scripting
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Discussion started by: aksijain
1 Replies
8. Programming
Hi,
I have two files formatted as following:
File 1: (user_num_ID , realID) (the NR here is 41671)
1 cust_034_60
2 cust_80_91
3 cust_406_4
..
..
File 2: (realID , clusterNumber) (total NR here is 1000)
cust_034_60 2
cust_406_4 3
..
.. (11 Replies)
Discussion started by: amarn
11 Replies
9. Shell Programming and Scripting
Hi,
i want to compare two files by one field say $3 in file1 needs to compare with $2 in file2.
sample file1 - reqd_charge_code
2263881188,24570896,439
2263881964,24339077,439
2263883220,22619162,228
2263884224,24631840,442
2263884246,22612161,442
sample file2 - rg_j
... (2 Replies)
Discussion started by: raghavendra.cse
2 Replies
10. Shell Programming and Scripting
I am trying to print the output of a command to two separate files. Is it possible to use awk to print $1 to one file and $2 to another file?
Thanks in advance! (1 Reply)
Discussion started by: TheCrunge
1 Replies