输入:
line1 with the PATTERN that contains ( )
line2 with the PATTERN that contains ( )
lineN with the PATTERN that contains ( )
Run Code Online (Sandbox Code Playgroud)
输出:
line1 with the PATTERN that contains ( ) ;
line2 with the PATTERN that contains ( ) ;
...
lineN with the PATTERN that contains ( ) ;
Run Code Online (Sandbox Code Playgroud)
我试过这个:
find . -name "test.txt" -print | xargs sed -i "/PATTERN/ s/$)/); /g"
Run Code Online (Sandbox Code Playgroud)
但它没有用。