输入:
line1 with the PATTERN that contains ( )
line2 with the PATTERN that contains ( )
lineN with the PATTERN that contains ( )
输出:
line1 with the PATTERN that contains ( ) ;
line2 with the PATTERN that contains ( ) ;
...
lineN with the PATTERN that contains ( ) ;
我尝试了这个:
find . -name "test.txt" -print | xargs sed -i "/PATTERN/ s/$)/); /g"
但这没用。
-exec ... +
代替来获得一些效率-exec ... \;
。