Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    Strangely, I had the same problem and it was because I had a sudo echo "" line.. Removing the 2 double quotes, leaving sudo echo makes it work perfectly. Commented Sep 3, 2018 at 21:04
  • 1
    @vinzee why would you ever run echo with sudo? That said, what you describe doesn't make much sense, there must have been something else going on. Commented Sep 4, 2018 at 8:02
  • I do sudo echo because the script will need sudo later in the commands but I want the user to enter his password early on, so that the script does not need his input anymore for a few minutes. And for the bug, I had the same error as seen here, but it was solved by removing the 2 double quotes. Nothing else happened.. Commented Sep 4, 2018 at 8:04
  • 2
    @vinzee you might want to read How do I run a 'sudo' command inside a script?. As for the quotes, there must have been something else. Maybe you had a non-printing character after the quotes that was deleted with them, for instance. Or maybe you had two single quotes and then a double (echo ''") or something like that, but there had to be something since echo "" is fine. Commented Sep 4, 2018 at 8:22
  • Thanks for the link, you're right. Running sudo echo felt a bit weird.. And I'll try again on my linux install tonight and get back to comment here the results. Commented Sep 4, 2018 at 8:29