Shell script Learning Guide-text processing tools 1. sort usage www.2cto.com sort-t:-k1, 1/etc/passwd --- sort by user name sort-t:-k3nr/etc/passwd --- sort by Reverse UID-k3nr, 3 ---- start from Field 3, reverse sort by value type, and end with sort-t at the end of Field 3: -k4n-k3n/etc/passwd --- sort-t:-k4n-u/etc/passwd by GID and UID --- sort several important options by unique GID-u: remove duplicate rows in the output row-r: change to descending order-o: Redirect File-n: sort by numerical Class 2. delete duplicate row uniq command uniq-d only show duplicate records uniq-u only show non-Repeated Records www.2cto.com 3. number of calculated rows, number of words, and number of characters wc default output is the number of lines, number of words and characters-l number of calculated rows-w calculated words-c Calculated number of characters 4. extract the first 10 rows of rows starting or ending with head-10sed 10q and then 10 rows of tail-10 tail-f for dynamic viewing