[quote]
1. sed command
sed '/^$/d' a.txt > output.txt
2. vim command
:g/^$/d
3. cat command
cat -s a.txt
4. vim command
:%!cat -s
[/quote]
1. sed command
sed '/^$/d' a.txt > output.txt
2. vim command
:g/^$/d
3. cat command
cat -s a.txt
4. vim command
:%!cat -s
[/quote]
本文介绍了几种常见的文本处理命令,包括sed、vim及cat等工具的基本用法,通过实例展示了如何使用这些命令来删除空行。
942

被折叠的 条评论
为什么被折叠?



