Sometimes commands repeat in pipeline command. For example (just to illustrate):
$ grep -lF 'pattern' ./foo/**/*.bar | xargs dirname | xargs dirname
Is there a way to shorten chaining command? For example, I have a command:
$ ... | some-command | some-command | some-command | ...
I'd like to get same result with something like to the following
$ ... | (some-command) ^ 3 | ...
Of course, it wouldn't work, but it illustrates what I'd like to make.