![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| How do I delete a data string from a .dat file in unix | supergirl3954 | UNIX for Dummies Questions & Answers | 4 | 03-04-2008 07:56 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | Shell Programming and Scripting | 2 | 12-28-2007 10:02 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | UNIX for Advanced & Expert Users | 1 | 12-28-2007 10:00 AM |
| edit, and delete data from you file | dorek | High Level Programming | 1 | 06-22-2006 10:09 PM |
| How to delete a record from a csv file | Rajeev Agrawal | UNIX for Dummies Questions & Answers | 1 | 02-04-2006 01:43 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to delete record in file data with index in another file?
I want to deal with several data, i.e., data.*.txt with following structure
MSG|20010102|123 125 4562 409|SEND MSG|20010102|120 230|SEND MSG|20010102|120 204 5071|SEND MSG|20010103|2 11 1098 9810|SEND ...... index file index.txt is 11 201 298 100 ...... What I want to do is: 1) extract the record in index.txt 2) search it in data files $3, if this colomn contains the index number, then delete this record, else save without change I have many questions: 1)Since each time I extract a record in index file, search it and delete records in data files, I have to save to original files for next index number. how can I save the file? 2) how to delete records using awk i think it needs shell and awk scripts, I try by myself, but i could not do any further. while read record do awk ...... down < index.txt thanks a lot. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|