Xargs

From Useful Things
Jump to: navigation, search

Build argument list from previous output

command | xargs ls -l

Run command per line of previous output

command | xargs -L1 ls -l

Run piped command per line of previous output

command | xargs -L1 sh -c 'command2 "$0" | command3'