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
  • 3
    Generally a bad idea to use eval: bash ./your_script '(echo rm /very/important/files); foo' -- by the time the syntax error occurs, your files are already deleted. Commented May 30, 2018 at 20:31
  • ./script '/usr/sbin/shutdown -h; x' :) Commented May 30, 2018 at 20:33
  • @StéphaneChazelas: Updated again, however I cannot get it to accept a[1] either way. Commented May 30, 2018 at 22:25
  • @StéphaneChazelas: Quoted $var to prevent globbing. Also I would argue that it's a good thing to tell students RANDOM, EUID, and UID are not valid variable names. :p Commented May 30, 2018 at 22:40
  • Modified again. Commented May 30, 2018 at 22:47