shell

lishaokang 2020-04-22

1. 删除空行

sed ‘/^$/d‘  file

2. 删除行首空格

sed ‘s/^ *//g‘ file
sed ‘s/^[[:space:]]*//g‘ file

相关推荐