复制/etc/profile至/tmp/目录用查找替换命令删除/tmp/profile文件中的空白行
更新:HHH   时间:2023-1-7


复制/etc/profile至/tmp/目录
[root@Contos7 tmp]#cp /etc/profile /tmp

删除/tmp/profile文件中的空白行
用查找替换命令删除/tmp/profile文件中的行首的空白字符
sed 's@^[[:space:]]+@@' profile
执行前:

执行后:
[root@Contos7 tmp]#sed 's@^[[space:]]\+@@' profile

返回系统运维教程...