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.

6
  • ... or use the list of positional parameters, first set -- before the loop, then set -- "$$@" "$$fifo" for the += line, and then use "$$@" instead of the named array further down. That would make it "more portable" :-) Commented Feb 12 at 22:58
  • @Kusalananda Note that that's only safe because we assume that mktemp won't return filenames with whitespace. Commented Feb 13 at 15:42
  • @Barmar are you sure? It’s quoted properly… Commented Feb 13 at 15:47
  • Right. Whitespace isn't a problem, but double quotes in the filename would be. Commented Feb 13 at 16:00
  • 1
    @Kusalananda Right again. It's easy to get lost in the nesting of expansions. Commented Feb 13 at 17:33