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*

4
  • While your example looks pretty useful, it's sufficiently dense that I'd have to really pick it apart with the bash manual open to figure out how it works (and I've worked with simpler bash most days for years.) I never did learn lisp. ;) Commented Sep 22, 2018 at 11:15
  • 1
    @Joe if it's OK to work with only two input files and no % interpolation in filters, the whole thing could be reduced to: cmd=$1; shift; flt=$1; shift; $cmd <($flt "$1") <($flt "$2"). But that's a lot less useful and illustrative imho. Commented Sep 22, 2018 at 11:25
  • 1
    Or even better $1 <($2 "$3") <($2 "$4") Commented Sep 22, 2018 at 11:31
  • +1 Thanks. Your comments, plus staring at it and playing with the code for some time, clarified it for me. I also learned a new term, "string interpolation", for something I've been using forever. Commented Sep 24, 2018 at 4:33