I want to run a simple command of replacing absolute paths to relative ones inside a CSS file like this:
sed -i 's/\/fonts/../fonts/' /Users/sergeybasharov/WebstormProjects/snap/compiled/Content/stylesheets/style.css It throws this
sed: 1: "/Users/sergeybasharov/W ...": bad flag in substitute command: 'b' What can be wrong in this simple script?
banywhere in your command, it must not be what you actually typed. Please paste the actual script.-ebefore the filename or you were missing thes/\fontscommand at the beginning. It's treating the filename as a sed instruction.manfor sed. It's written there that after -i I should use extension that is used to make a backup file. If empty string is provided, then no backup will be created. So I have put it like-i ''and it worked.