Below is my sed command:
sed "s/N([0-9]*)/sum('\1')/g" old.txt > new.txt
works fine in bash terminal
But below python code doesnot execute :-
file1=old.txt
file2.new.txt
sed_cmd = 'sed "s/0x\([0-9]*\)/sum('\1')/g" %s > %s' %(file1,file2)
I get syntax error
After above I need do :-
subprocess.call([sed_cmd],shell=True)