![]() |
|
|
google unix.com
|
|||||||
| Forums | Casino | Register | Forum Rules | Links | Albums | FAQ | Members List | 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 |
| how to read record by record from a file in unix | raoscb | UNIX for Dummies Questions & Answers | 1 | 05-16-2008 06:30 AM |
| Remove First and Last Record from a file | ravikuc | UNIX for Dummies Questions & Answers | 1 | 10-11-2007 03:35 AM |
| splitting a record and adding a record to a file | rsolap | Shell Programming and Scripting | 1 | 08-13-2007 01:58 PM |
| command to remove last record on file | mheinen | UNIX for Dummies Questions & Answers | 4 | 01-09-2007 03:39 PM |
| remove duplicated xml record in a file under unix | happyv | Shell Programming and Scripting | 8 | 09-20-2006 01:36 PM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
How to remove a particular record from a file?
Please tell me the command(s) to remove a particular record from the file and placing the rest of the record in a seperate file.
|
| Sponsored Links |
|
|||
|
file type:
Code:
NMT000010000100001ENVL,CSP,28#,9X12,KFT,1C 00001 NA20000105500000003081547100100008000000000024.19 000000000000001DZ 000000000024.19 000000000000000 00002 NPD TOP63120 TOP63120 NP2 00000000000000 00000000000000 000 00000000000000 00000000000001 00000000000000 00000000000000 NMT000010000800001PAD,LGL RL,PRISM,LTR,BE |
|
|||
|
Code:
grep -vE '^(NPD|NA2)' file > file2 Code:
cat file | perl -ne 'print unless /^(NPD|NA2)/;' |
|||
| Google The UNIX and Linux Forums |