Created
August 21, 2015 14:19
-
-
Save sanmiguel/089e8538a949df903f9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh-3.2$ find lib -name "*ex" | |
| lib/bar baz.ex | |
| lib/foo.ex | |
| sh-3.2$ wc -l `find lib -name "*ex"` | |
| wc: lib/bar: open: No such file or directory | |
| wc: baz.ex: open: No such file or directory | |
| 19 lib/foo.ex | |
| 19 total | |
| sh-3.2$ find lib -name "*ex" | xargs wc -l | |
| wc: lib/bar: open: No such file or directory | |
| wc: baz.ex: open: No such file or directory | |
| 19 lib/foo.ex | |
| 19 total | |
| sh-3.2$ find lib -name "*ex" -print0 | xargs -0 wc -l | |
| 20 lib/bar baz.ex | |
| 19 lib/foo.ex | |
| 39 total | |
| sh-3.2$ find lib -name "*ex" -exec wc -l {} + | |
| 20 lib/bar baz.ex | |
| 19 lib/foo.ex | |
| 39 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment