入力:
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 ... \;
。