我有下一个代码:
command[check_ping]=/usr/lib64/nagios/plugins/check_ping -w $ARG1$ -c $ARG2$
command[check_filemtime]=/usr/lib64/nagios/plugins/check_filemtime $ARG1$
command[check_iostat]=/usr/lib64/nagios/plugins/check_iostat $ARG1$ $ARG2$
command[check_open_files]=perl /usr/lib64/nagios/plugins/check_open_files.pl -w $ARG1$ -c $ARG2$
command[check_itai]=/usr/lib64/nagios/plugins/itai
command[check_mem]=perl /usr/lib64/nagios/plugins/check_mem.pl -w $ARG1$ -c $ARG2$_
command[check_uptime]=/usr/lib64/nagios/plugins/check_uptime
command[check_ifstatus]=/usr/lib64/nagios/plugins/check_ifstatus -w $ARG1$ -c $ARG2$
command[check_local_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_local_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
在 vim 编辑器中,我想"\"
在每个$ARG
参数之前添加一个转义字符,所以我尝试了这个命令:
:81,129!sed -e "/\<\$A/\<\\$A"
,但是发生的是这些行(81-129)消失了,sed
命令的错误写在第 81 行,我究竟做错了什么?81-129 是文件中的相关行号