Use sed to delete blank lines made up of spaces
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Originally posted by amio at 2008-7-13 12:52:
Seems like it doesn't do anything
Originally posted by HAT at 2008-7-13 02:38 PM:
@echo off
sed "/^ *$/d" a.txt>b.txt
move /y b.txt a.txt
C:\Test>C:\ProgramMy\GnuWin32\sed --version
GNU sed version 4.1.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
@echo off
sed "s/^ *//g" a.txt>b.txt
move /y b.txt a.txt| Rater | Score | Time |
|---|---|---|
| amio | +2 | 2008-07-13 17:33 |
@echo off
sed "s/^ *//g" a.txt|find /v "">b.txt
move /y b.txt a.txt