![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can you limit the compare on "comm" command | eja | UNIX for Dummies Questions & Answers | 0 | 03-23-2007 08:48 AM |
| comm command in sorting IP | tads98 | UNIX for Advanced & Expert Users | 1 | 05-16-2006 04:41 AM |
| Comm, command help | cowpoke | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 05:26 AM |
| comm with a variable | gozer13 | Shell Programming and Scripting | 3 | 07-13-2005 05:29 PM |
| comm ?! | tine | Shell Programming and Scripting | 8 | 12-07-2003 11:52 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
comm command
Hi
I have issue with "comm " command file-1 ---- l65059 l65407 l68607 l68810 l69143 l71310 l72918 l73146 l73273 l76411 file-2 ----- k55080 g43140 sg55591 j20766 j32013 k28117 k40986 k47893 k98497 l26497 l47365 l76411 when I execute comm -23 file-2.txt file-1.txt, It should showing l76411 , why is it happening, because it should show only list which is not present in file-1. Please let me know Thx Arv |
| Forum Sponsor | ||
|
|
|
|||
|
Hi madhan,
I have given extract of file1 and file2. Both are sorted, when I execute it "comm -23 file-2.txt file-1.txt"..it is still showing "l76411". Ideally it should not right..bcos it is available in both files. Any idea why so? Thanks Amit |
|
|||
|
comm -23 'll print only the line which is there in the first file. ( should not present in the second )
l76411 is present in both the file therefore its not there in the o/p. the o/p is currect. infact u are expecting a wrong o/p from the UNIX. remember when u give comm -23 file2.txt file1.txt file2.txt 'll be treated as file1 ( the first arg )of the comm std i/p. and file1.txt as the seconds arg. Anchal |