I am trying to pass in assets/css/images to replace images in multiple files.
So I wrote this script
$list
$word
$neword
$i
echo "select files: "
read list
echo "input word to search for: "
read word
echo "input word to replace with: "
read neword
for i in $list
do
sed -i "s/${word}/${neword}/g" $i
done
It works for words without a /, and I can see why, but I don't know how to get around it. Anyone?