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*

6
  • That's not a valid script, I think you meant USER=$(whoami). Note that the USER already exists as a shell internal variable. Also, if it's a bash script, don't run it using sh, which only has a POSIX-compatible subset of features. Commented Jun 15, 2014 at 11:26
  • why not edit? fixed now. Commented Jun 15, 2014 at 18:03
  • It's too trivial, edits need to be at least 6 characters, at least suggested ones. Commented Jun 15, 2014 at 18:48
  • ok, I understand. Thanks for the tips :D I usually put a hashbang like this #!/usr/bin/env bash on my bash scripts. Commented Jun 15, 2014 at 21:30
  • The hashbang is ignored if you call it explicitly with sh or something else. Commented Jun 15, 2014 at 22:20