Igor Gorelikov wrote:You can do dit with sed:
sed "s/Round .?//" input_file > output_file
Better use the batch file with this line.
Igor
Hi Igor,
1) "sed" is only available under UNIX, or with CygWin or any other "UNIX emulation" environment on non-UNIX platforms. So I'm not sure whether Roy can use it.
2) With "sed" commands starting with the letter 's' (for 'substitute') you can't remove whole lines but only change lines. As far as I know there is no multi-line replacement using '\n' on the left side (but I may be wrong).
3) Your given "sed" command transforms lines of the form [Round "?"] into ["]. I think you meant this:
- Code: Select all
sed 's/^\[Round "?"\]$//' input_file > output_file
which replaces such lines with an empty line (still not the solution).
4) "find /v /i ..." in a DOS shell (or batch), as pointed out by Tim, looks good and should solve the problem. Under UNIX or CygWin, the same can be done with:
- Code: Select all
grep -v '^\[Round "?"\]$' input_file > output_file
in order to filter out exactly the [Round "?"] lines.
Cheers,
Sven