![]() |
|
|
|
|
|||||||
| 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 |
| How do I delete a data string from a .dat file in unix | supergirl3954 | UNIX for Dummies Questions & Answers | 4 | 03-04-2008 04:56 AM |
| edit, and delete data from you file | dorek | High Level Programming | 1 | 06-22-2006 07:09 PM |
| Script to delete all data from multiple files | uni_ajay_r | Shell Programming and Scripting | 5 | 03-29-2006 08:05 AM |
| Delete blocks with no data.. | mgirinath | Shell Programming and Scripting | 1 | 01-28-2006 03:33 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Delete unmatched data
Hi,
I try to write script to compare 2 data file (list of numbers) which after that I want to delete unmatched numbers and create new file for matched numbers. Can anybody to help me? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
could you pls post some sample data from these 2 files?
|
|
#3
|
|||
|
|||
|
Hi,
The sample data as below; File 1 (number1.csv): 1 2 3 4 5 6 7 8 9 File 2 (number2.csav): 1 3 5 9 -nazri76- |
|
#4
|
||||
|
||||
|
I hope this is not homework.
In your case, where file is already sorted: Code:
comm -12 file1 file2 > file3 |
|
#5
|
|||
|
|||
|
Thankss!!! But if the file no sorted, is it i need to sort it first?
No, this is not homework, but something that i need to do everyday. -nazri76- |