Shell script: send sed output to mysql?

bash, mysql, shell

Solution

sed -e "s/2000/$START/g" -e "s/2009/$END/g" < WAR.sql | mysql -D WAR

Problem

Trying to pipe the output of a sed replacement on a text file into MySQL like so: ``` mysql -D WAR | sed -e "s/2000/$START/g" -e "s/2009/$END/g" < WAR.sql ``` That's not working. Nor is: ``` mysql -D WAR < sed -e "s/2000/$START/g" -e "s/2009/$END/g" < WAR.sql ``` What's the proper solution here?

Original source