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*

3
  • related: unix.stackexchange.com/questions/383738/… & unix.stackexchange.com/questions/38310/conditional-pipeline Commented Dec 7, 2017 at 19:28
  • But as the function will just run the commands within it with the same stdin and stdout, you should be able to do func() { foo | bar; } and then use func in place of foo | bar Commented Dec 7, 2017 at 19:31
  • @ilkkachu I do not quite understand what I'm doing wrong, I allways get syntax error near unexpected token (' maybe I should come up with a real MWE that could run... Commented Dec 7, 2017 at 19:50