This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
команды_фильтры [2018/08/16 10:48] val [tr] |
команды_фильтры [2018/10/18 12:55] val [sort] |
||
---|---|---|---|
Line 7: | Line 7: | ||
<code> | <code> | ||
- | $ cut -d: -f1 /etc/passwd | ||
$ cut -d: -f1,7 /etc/passwd | $ cut -d: -f1,7 /etc/passwd | ||
- | $ cut -d: -f1-3 /etc/passwd | + | |
$ cut -c1-5 /etc/passwd | $ cut -c1-5 /etc/passwd | ||
+ | |||
+ | $ cat /etc/passwd | rev | cut -c 2- | rev #remove last character | ||
</code> | </code> | ||
Line 31: | Line 32: | ||
Ключи -n -r -u -kN | Ключи -n -r -u -kN | ||
+ | <code> | ||
+ | $ sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 addresses.txt | ||
+ | </code> | ||
===== uniq ===== | ===== uniq ===== | ||