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?
sed "s/2000/$START/g;s/2009/$END/g" WAR.sql | mysql -D WAR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With