Assuming I have a text file where some lines are of this format:
%attr(750,user1,group1) "/mydrive/mypath1/mypath2\winpath1\winpath2\file.xml"
What I wanna achieve is:
- touch only those lines which start with %attr
- on each of such lines find the last occasion of ".*" (including quotes)
- inside that last occasion replace all
\
to/
What is the proper syntax for sed utility?
awk can do the job easily:
To change the original file:
you can try this
sed '/\%attr/{s/\\/\//g}'