Batch to delete Lines

Microsoft Windows xp professional sp2c e...
July 21, 2010 at 16:56:07
Specs: Windows 2003 or 2008, Intel/4GB
Hi Experts,

I need a batch program which can delete lines from my file by following below given conditions.

1. File is Tab delimited file.
2. Batch should insert H before first line and T before 2nd Line.
3.Batch should delete all the lines except which has value 5000 and 0 in 1st and 5th column

Sample Data:

0000 val2 val3 val4 val5....val n
0000 val2 val3 val4 val5....valn
4000 val2 val3 val4 val5....valn
4000 val2 val3 val4 val5....valn
5000 val2 val3 val4 5....valn
5000 val2 val3 val4 5....valn
5000 val2 val3 val4 0....valn


Output:-

H0000 val2 val3 val4 val5....val n
T0000 val2 val3 val4 val5....valn
5000 val2 val3 val4 0....valn

Thanks,
Phani Akella


See More: Batch to delete Lines

Report •


#1
July 21, 2010 at 17:27:09
this looks familiar. You have asked this question before. So what have you tried so far from your previous thread.? What doesn't work?

GNU win32 packages | Gawk


Report •
Related Solutions


Ask Question