10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
2. Shell Programming and Scripting
Dear All
I want below to compare two Consecutive line(i.e. current and next line). Based in that i need OP. Below is the IP file in that in i find "M" and if in next line i find "*" then i need both line in single line. If i dont find "*" in next line then i need to put commend "DOWN" .
I am... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies
3. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
4. Shell Programming and Scripting
Hello,
I have two files file 1 and file 2 each having result of a query on certain database tables and need to compare for Col1 in file1 with Col3 in file2, compare Col2 with Col4 and output the value of Col1 from File1 which is a) not present in Col3 of File2 b) value of Col2 is different from... (2 Replies)
Discussion started by: RasB15
2 Replies
5. Shell Programming and Scripting
my script so far
nawk -F, 'NR==FNR{a++;next} a{b++}
END{for(i in b){if(b-1){print i";\t\t"b}else{print "NEW:"i";\t\t1"} } }' OFS=, 20111228.csv *.csv | sort
NE:221478,SHELF:13,SLOT:4; 2
NE:221726,SHELF:8,SLOT:1; 2
NE:222318,SHELF:14,SLOT:1; 9... (20 Replies)
Discussion started by: llcooljatt
20 Replies
6. UNIX for Dummies Questions & Answers
Hello I am a new unix user, and I have a work related task to compare 2 files and print all of the lines in file 2 that contain a string from file 1 Note: the fields are in different columns in the files. I suspect the is a good use for awk? Thanks for your time & help
File 1
123 232 W343... (6 Replies)
Discussion started by: KevinRidley
6 Replies
7. Shell Programming and Scripting
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
FILE 1:
ABS 456 315
EBS 923 163
JYQ3 654 237
FILE 2:... (1 Reply)
Discussion started by: engr.jay
1 Replies
8. Shell Programming and Scripting
Below is the data content of file_1 and file_2:
file_1
>sample_1
FKGJGPOPOPOQA
ASDADWEEWERE
ASDAWEWQWRW
ASDASDASDASDD
file_2
>sample_1
DRTOWPFPOPOQA
ASDADWEEASDF
ASDADRTYWRW
ASDASDASDASDD
I got try the following perl script. Unfortunately, it can't give my desired output result... (7 Replies)
Discussion started by: patrick87
7 Replies
9. Shell Programming and Scripting
Hello,
I have two files that I need to compare and print out the line from file2 that has the first 6 fields matching the first 6 fields in file1. Complicating this are the following restrictions
1. file1 is only a few thousand lines at most and file2 is greater than 2 million
2. I need to... (7 Replies)
Discussion started by: gillesc_mac
7 Replies
10. Shell Programming and Scripting
Hi
I have two files in unix. I need to compare two files and print the differed lines in other file
Eg
file1
1111
2222
3333
file2
1111
2222
3333
4444
5555
newfile
4444
5555
Thanks In advance (3 Replies)
Discussion started by: evvander
3 Replies