input:
line1 with the PATTERN that contains ( )
line2 with the PATTERN that contains ( )
lineN with the PATTERN that contains ( )
output:
line1 with the PATTERN that contains ( ) ;
line2 with the PATTERN that contains ( ) ;
...
lineN with the PATTERN that contains ( ) ;
Saya mencoba ini:
find . -name "test.txt" -print | xargs sed -i "/PATTERN/ s/$)/); /g"
tapi itu tidak berhasil.
-exec ... +
alih - alih-exec ... \;
, jika temuan Anda memungkinkan.