I am wanting to build a custom builtin in
bash -- like
time for example. Is this possible? If it's not, is it possible in another shell?
For example, I want to do this:
map find -name '*.js' | xargs grep func1 and have it run
find -name '*.js' | xargs grep func1 inside every directory within CWD. Notice that everything including the pipe gets passed to
The goal is to apply a command across multiple directories. I wrote a script called
$1 across whatever
ls produces. However, if the command I want to run includes pipes, redirects, etc, then I have to quote everything inside a string. I am looking for a way to not have to do that.
Also, I'm just plain curious if this is possible ;)