![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comm not working | amitrajvarma | Shell Programming and Scripting | 7 | 05-06-2008 11:44 AM |
| getting problem in my code:::: plz help...(multithreaded appn with serial comm.) | arunchaudhary19 | High Level Programming | 0 | 10-29-2007 09:38 AM |
| getting problem in my code:::: plz help...(multithreaded appn with serial comm.) | arunchaudhary19 | Linux | 0 | 10-26-2007 07:24 AM |
| comm with a variable | gozer13 | Shell Programming and Scripting | 3 | 07-13-2005 09:29 PM |
| comm ?! | tine | Shell Programming and Scripting | 8 | 12-08-2003 03:52 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
problem with using comm
hi,
I have two unsorted files and want to delete the lines which are common to both. file 1: S1069656304010437 S1069656304010449 S1470204501005393 S1069656304010474 S0001209208001294 S0000000012345678 S0001457507000590 S0002641707000784 S1470204501005381 S0001457507000280 S147020450100540X S1069656304010450 file 2: S1069656304010437 S1069656304010449 S1069656304010474 S1069656304010450 code : comm -23 file1 file2 results in S1470204501005393 S1069656304010474 S0001209208001294 S0000000012345678 S0001457507000590 S0002641707000784 S1470204501005381 S0001457507000280 S147020450100540X S1069656304010450 But still two lines that are common are not removed. S1069656304010474 S1069656304010450 Can ne one help me how to remove all the lines that are common to both? i am using tcsh |
|
||||
|
yeah i can sort and then use it.
As i will be using the comm frequently. i need to sort many of such files which has to be comm 'ed later. which creates many temp files. Ne other method that can delete lines that are common in two files?? |
|
|||||
|
To remove spaces at the beginning.... Code:
$ diff file200 file400 | grep "<" | sed 's/<//g' | cut -c 2- S1470204501005393 S0001209208001294 S0000000012345678 S0001457507000590 S0002641707000784 S1470204501005381 S0001457507000280 S147020450100540X |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|