3 ms·
I find xargs handy, it lets you use the output of one command as arguments for another command. As an example, I have a little alias that I use to grep through
by pwk 18y ago
I find xargs handy, it lets you use the output of one command as arguments for another command. As an example, I have a little alias that I use to grep through my ruby/rails source trees:
alias gr 'find . -name \*.rb -o -name \*.rhtml -o -name \*.erb -o -name \*.rjs | xargs egrep \!*'
(backticks can be used similarly, but can run into command line length limits)