且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

用于删除 C++ 注释的 sed 脚本:脚本重复行

更新时间:2023-12-05 18:55:28

运行 sed 脚本的预期命令行是 /bin/sed -nf(来自社帮线).

The intended command line to run that sed script is /bin/sed -nf (from the shebang line).

您的命令 (sed -i -f remccoms3.sed) 省略了 -n 参数.

Your command (sed -i -f remccoms3.sed) leaves out the -n argument.

sed-n 参数是

-n, --quiet, --silent

-n, --quiet, --silent

禁止自动打印模式空间

所以没有它你会得到正常的打印脚本的打印.

so without that you get the normal printing and the script's printing.