10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have file1 and file2
file1
ABC
XYZ
file2
ABC
so i used the below command
comm -12 file1 file2 > matched
comm -23 file1 file2 > unmatched
I need some other command because this is not working in the current unix version (1 Reply)
Discussion started by: ATWC
1 Replies
2. Shell Programming and Scripting
Hello All,
Iam using below method to sort and compare files. First iam doing sorting and changing the same file and then doing comparing and taking the final result to another file.
sort -o temp.txt file1
mv temp.txt file1
sort -o temp.txt file2
mv temp.txt file2
sort -o temp.txt... (6 Replies)
Discussion started by: Vikram_Tanwar12
6 Replies
3. UNIX for Dummies Questions & Answers
Hello , I am trying to get contents which are only present in a.csv ,so using comm -23
cat a.csv | sort > a.csv
cat b.csv | sort > b.csv
comm -23 a.csv b.csv > c.csv.
a.csv
SKU COUNTRY CURRENCY PRICE_LIST_TYPE LIST_PRICE_EFFECTIVE_DATE
TG430ZA ZA USD DF ... (4 Replies)
Discussion started by: RaviTej
4 Replies
4. Shell Programming and Scripting
I'm looking to compare two delimited files:
file1
one|xxx
two|xxx
three|xxx
file2
four|xxx
five|xxx
six|xxx
one|yyy
Where the result is the the file2 row whose first field does NOT appear in file1. I.e., the correct result would be:
result
four|xxx (3 Replies)
Discussion started by: tiggyboo
3 Replies
5. Shell Programming and Scripting
I have four files, I need to compare these files together.
As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes.
Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies
6. UNIX for Dummies Questions & Answers
could some one please explain with examples how comm -12 & comm -3 works. I am confused with manual page, Thankyou. (2 Replies)
Discussion started by: Ariean
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have around 14-15 files and i want to sort all the files and then compare. I dont want to sort them and store in a different file and then compare. I want to compare two files at a time. Is there a way we can do this using a single command? (5 Replies)
Discussion started by: dnat
5 Replies
8. Shell Programming and Scripting
Hi
I have issue with "comm " command
file-1
----
l65059
l65407
l68607
l68810
l69143
l71310
l72918
l73146
l73273
l76411
file-2
----- (8 Replies)
Discussion started by: amitrajvarma
8 Replies
9. UNIX for Dummies Questions & Answers
I need to find deleted records from a file. I compare yesterdays file.old to todays file.new. I need to find the records that were in yesterdays file that are not in todays. My file is fixed field. If I run a "comm -23" obviously what i find is not necesarilly a delete, it could be a change.
... (0 Replies)
Discussion started by: eja
0 Replies
10. UNIX for Dummies Questions & Answers
See my other post on sdiff ....
I don't think sdiff is able to do what I want.
The 'comm' command does what I need and works fine as
far as the logic and results.
The problem I'm having is with the output format, it outputs 3 columns of data,
but because of the way it starts each line... (2 Replies)
Discussion started by: cowpoke
2 Replies