0

In a batch script I have things like:

sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password PASSWORDHERE'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password PASSWORDHERE'

Which throws the error message unexpected redirection associated with such lines, why is this happening and how can I get around it?

0

1 Answer 1

1

You're probably running under a different shell (e.g.: plain sh)

Execute the script with bash.

Sign up to request clarification or add additional context in comments.

2 Comments

I do use bash, the exact same code, and I get the same issue.

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.