Would like to Retain a line if following match a pattern?
Posted: Thu May 12, 2005 11:27 pm
Hello,
I'm new to TextPipe.
I would like to remove line matching a pattern but not if the following line contains another patern
Here my file.
Support #1 : "Full"
Restore started 13:11
Directory\\MOZART\G$\
mirror.log 1359483 31/03/05 18:31
robo.bat 229 31/03/05 18:10
Directory\\MOZART\G$\DATA
Directory\\MOZART\G$\DATA\SYSTEM
desktop.ini <H> 65 28/04/05 11:18
If would like to keep line containing "/"
Remove line started by Directory only il the following line do no contains "/"
Result should be:
Directory\\MOZART\G$\
mirror.log 1359483 31/03/05 18:31
robo.bat 229 31/03/05 18:10
Directory\\MOZART\G$\DATA\SYSTEM
desktop.ini <H> 65 28/04/05 11:18
Thanks for any advice.
I'm new to TextPipe.
I would like to remove line matching a pattern but not if the following line contains another patern
Here my file.
Support #1 : "Full"
Restore started 13:11
Directory\\MOZART\G$\
mirror.log 1359483 31/03/05 18:31
robo.bat 229 31/03/05 18:10
Directory\\MOZART\G$\DATA
Directory\\MOZART\G$\DATA\SYSTEM
desktop.ini <H> 65 28/04/05 11:18
If would like to keep line containing "/"
Remove line started by Directory only il the following line do no contains "/"
Result should be:
Directory\\MOZART\G$\
mirror.log 1359483 31/03/05 18:31
robo.bat 229 31/03/05 18:10
Directory\\MOZART\G$\DATA\SYSTEM
desktop.ini <H> 65 28/04/05 11:18
Thanks for any advice.