I would like to save output of first command as variable in front of pipeline and send them to the pipe, too.
For example: find -type d | grep -E '^\./y'. And in my variable going to be output of find -type d.
Thanks for help
EDIT
Maybe I can solve this problem another way, but I am standing in front of another problem. How to call my own function with parameter from pipeline?
EX: find -type d | MyFunction
RE:
The following all work:
So I’d imagine if
find -type d | MyFunctiondoesn’t work, then the function is probably not looking for input on stdin.