I want to replace the below strings
replace: print 'Status Code: {code}'.format(code=r.status_code)
with: print('Status Code: {code}'.format(code=r.status_code))
Here is the command I ran which fails
find ./ -type f -exec gsed 's/'print 'Status Code: {code}'.format(code=r.status_code)'/'print('Status Code: {code}'.format(code=r.status_code))'/g' {} \;
I tried to use \ to avoid the special characters effect but still fails too and just hangs.
find ./ -type f -exec gsed -i 's/print \'Status Code: {code}\'.format\(code=r.status_code\)/print\(\'Status Code: {code}\'.format\(code=r.status_code\)\)/g' {} \;
>
>
>