中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-09 04:57
47,811 topics / 349,895 posts / today 0 new / 48,253 members
DOS批处理 & 脚本技术(批处理室) » Use sed to delete blank lines made up of spaces
Printable Version  1,890 / 18
Floor16 amio Posted 2008-07-14 18:35
中级用户 Posts 93 Credits 206
Won't make a new thread, let me ask one more question about sed.
Delete all lines under a line containing [] until the next [] line, including the [] lines themselves.

Example:

[aaa]
111
222
333

[bbb]
444
555
666

[ccc]
777
888
999

Becomes:

[aaa]
111
222
333

[ccc]
777
888
999

Better not judge by line numbers
Floor17 HAT Posted 2008-07-14 19:37
版主 Posts 5,017 Credits 9,023
Including the [] lines themselves—if you match by that condition, then shouldn't everything under [aaa] and [ccc] also be deleted?
Floor18 amio Posted 2008-07-15 18:34
中级用户 Posts 93 Credits 206
I mean [bbb] itself
Floor19 HAT Posted 2008-07-15 20:58
版主 Posts 5,017 Credits 9,023
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023