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.

2
  • 2
    If the commands read from the file is only ever so slightly more complex, this may break or generate unexpected results. You need to quote $varBar as well as make sure that the code read from the file is valid and correctly quoted shell code. Try with the command cd /; printf '*\t%s\n' * in the input data. Commented Aug 24, 2021 at 21:25
  • If you're going to recommend eval, you need to go into the pitfalls and dangers of doing such (some of which @Kusalananda pointed out). eval has its place, but it's a very precarious one. Commented Sep 8, 2021 at 19:42