Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there some tool that auto quotes regex for seq?

I can't figure out what I'm doing wrong. I always get this error unterminateds' command`

sed -i 's/INSERT INTO `tablename.*`/INSERT INTO \`othertable\`' *.sql

Do I have to quote these special mysql quotes?

share|improve this question
up vote 2 down vote accepted

You lack a terminating slash (the second-last character):

's/INSERT INTO `tablename.*`/INSERT INTO \`othertable\`/'

This works in bash, but obviously will not work on Windows cmd:

echo INSERT INTO '`tablenameasdf`' | sed 's/INSERT INTO `tablename.*`/INSERT INTO \`othertable\`/'
INSERT INTO `othertable`
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .