复制 / etc/profile 至 / tmp / 目录
[[email protected] tmp]#cp /etc/profile /tmp
删除 / tmp/profile 文件中的空白行
用查找替换命令删除 / tmp/profile 文件中的行首的空白字符
sed '[email protected]^[[:space:]][email protected]@' profile
执行前:
执行后:
[[email protected] tmp]#sed '[email protected]^[[space:]]\[email protected]@' profile
来源: http://www.bubuko.com/infodetail-3323036.html