perl if问题,不太懂这个命令用法,求解答。

2025-03-24 09:36:55
推荐回答(1个)
回答1:

perl -i -pe 'print "#" if /HOLD/ && /From/' file 这样就对了, -p就是指对文件中每一行操作 -e后面接perl的脚本