Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when trying to run an echo instruction in multiple line #1363

Open
baudoliver7 opened this issue Mar 14, 2022 · 1 comment
Open

Bug when trying to run an echo instruction in multiple line #1363

baudoliver7 opened this issue Mar 14, 2022 · 1 comment

Comments

@baudoliver7
Copy link

baudoliver7 commented Mar 14, 2022

When we attempt to run this script :

echo -e \
    "Host *\n  StrictHostKeyChecking no\n  UserKnownHostsFile=/dev/null" \
    > ~/.ssh/config

We got this error :

+ echo ' '
 
+ 'Host *\n  StrictHostKeyChecking no\n  UserKnownHostsFile=/dev/null' ' '
/home/r/script.sh: line 9: Host *\n  StrictHostKeyChecking no\n  UserKnownHostsFile=/dev/null: No such file or directory
container 339e933a641c882de9bef3cc78fda55ba87ab17f3c62c5e6a8b9912e0c39b42a is dead
Mon Mar 14 00:58:10 CET 2022

But when we run the same command line on a single line, it works well.

@pnatashap
Copy link
Contributor

As I see really each line is supposed to be one command. Will check it deeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants