sed -e' / \ $ FileCreateMode / s / ^ /#/' /etc/rsyslog.conf
回声' $ FileCreateMode 0640' >> /etc/rsyslog.conf如何将上述两个命令合并为一个命令?
答案 0 :(得分:0)
你可以尝试
FileCreateMode=what_you_want;sed -i "/$FileCreateMode/s/^/$FileCreateMode 0640\n#/" /etc/rsyslog.conf