How do I correctly use variables with sed?
I need to use a string variable in a sed command. My attempt is given in script.sh, it does not do what I want, I assume because my variable contains characters that I need sed to evaluate. I am working in linux bash. input.txt delicious.banana gross.apple script.sh adjectives="delicious\|gross\|bearable\|yummy" sed "s/\($adjectives\)\.//g" input.txt > output.txt output.txt desired… Read More How do I correctly use variables with sed?