Hello, I'm trying to change the image paths in a directory of files. My first question is that I'm trying to use this line to test the change in one file: sed -e 's/images/http://cache.somewebsite.com/images' ajax_scaffold.css When I try that I get this: sed: 1: "s/images/http://cache.r ...": bad flag in substitute command: '/' I did a test by running this: sed -e 's/images/duh/' ajax_scaffold.css and the output said the changes had worked but when I went to the actual file, the changes didn't show? Also, when I find a command that works, is it possible to specify a directory and run this command on every file w/in the directory?
hello, and thanks for your help. this is the solution that worked for me: Code: for file in *; do sed -e 's/\/images/http:\/\/cache\.reverbnation\.com\/images/g' "$file" > "${file}.sub" rm "$file" mv "${file}.sub" "${file}" done