mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 11:16:27 +08:00
parent
7d16b5bd5c
commit
b564befde5
1 changed files with 1 additions and 1 deletions
|
@ -295,7 +295,7 @@ A few examples of piecing together commands:
|
|||
cat a b b | sort | uniq -u > c # c is set difference a - b
|
||||
```
|
||||
|
||||
- Use `grep . * | less` to quickly examine the contents of all files in a directory - each line is paired with the filename. This can be useful for directories filled with config settings like those in `/sys`, `/proc`, `/etc`.
|
||||
- Use `grep . *` to quickly examine the contents of all files in a directory (so each line is paired with the filename), or `head -100 *` (so each file has a heading). This can be useful for directories filled with config settings like those in `/sys`, `/proc`, `/etc`.
|
||||
|
||||
|
||||
- Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python):
|
||||
|
|
Loading…
Reference in a new issue