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*

2
  • 2
    The way to avoid forking a new process for each line would be to pass the input lines to a single run of the tool to parse the quoted string and have the tool output the same data in some other, more suitable format. E.g. turn "foo" ="bar" into foo#bar, where the # is some character that will not appear in the actual data, e.g. a control character. (Say, tab; or \0x1F, the ASCII Unit separator; or just something random like \x01.) I would expect Bash in particular might be rather slow in single-char fiddling like this. Commented Feb 1 at 22:16
  • That does seem to be a sensible suggestion if attempting to handle all this in the same bash script proves too unwieldy or slow. Commented Feb 1 at 22:23