Questions:
1) Using sed, how would you do a pattern replacement if the pattern contains slashes?
Example:
Input Pattern is /w585/odbi/BCPWK/DOCGET/
Output Pattern is blank
sed -i 's//w585/odbi/BCPWK/DOCGET///' filename
When I use the above command I get the following error:
sed: -e expression #1, char 9: unknown option to `s'
2) Can you do a in place edit using awk?
Thank you
1) Using sed, how would you do a pattern replacement if the pattern contains slashes?
Example:
Input Pattern is /w585/odbi/BCPWK/DOCGET/
Output Pattern is blank
sed -i 's//w585/odbi/BCPWK/DOCGET///' filename
When I use the above command I get the following error:
sed: -e expression #1, char 9: unknown option to `s'
2) Can you do a in place edit using awk?
Thank you
Comment