0

I'm running the below script

mysql -u $_db_user -p$_db_password $_db << eof
INSERT INTO \`manufacturemap\`
(\`manufacture_id`\ `manufacture_name`\) VALUES (122,IBM)
eof
done
exit

but it shows the following Error

bad substitution: no closing "`" in `manufacture_name'\) VALUES    (122,IBM))

I've tried everything I know,Please help, kinda stuck here.

1 Answer 1

1

Missing , and wrong \s in ->

(\`manufacture_id`\ `manufacture_name`\)

Should be -

(\`manufacture_id\`, \`manufacture_name\`)

No escaping needed -

INSERT INTO manufacturemap (manufacture_id, manufacture_name) VALUES (122, 'IBM')
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much b0s3,You saved my day.More questions coming up ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.