xargs
Here is a really straightforward example of using xargs,
- -t will show you what xargs is about to execute before it executes it.
- -n1 limits the arguments passed by the directory to pass one argument, in this case one file name at a time.
Tin-Phams-iMac:PC tinpham$ ls | xargs -t -n1 md5 md5 planetary.doc MD5 (bash) = ab5970d50d67bcafe5c554387f76534e md5 Superman.jpg MD5 (cat) = cdefa50d737dfcf8dc57886ea1a758c4 Tin-Phams-iMac:bin tinpham$