Remove duplicate xargs item.

Fixes #194.
pull/194/merge
Joshua Levy 2015-07-14 01:45:38 -07:00
parent 87670d5522
commit 795250b5f7
1 changed files with 0 additions and 6 deletions

View File

@ -286,12 +286,6 @@ A few examples of piecing together commands:
find . -type f -ls
```
- Use `xargs` or `parallel` whenever you can. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use xargs echo first. Also, `-I{}` is handy. Examples:
```sh
find . -name '*.py' | xargs grep some_function
cat hosts | xargs -I{} ssh root@{} hostname
```
- Say you have a text file, like a web server log, and a certain value that appears on some lines, such as an `acct_id` parameter that is present in the URL. If you want a tally of how many requests for each `acct_id`:
```sh
cat access.log | egrep -o 'acct_id=[0-9]+' | cut -d= -f2 | sort | uniq -c | sort -rn