1. Description
Cut [Option] files
Cut-D 'separator '-F Fields
Retrieve some specific fields of the file with different fields
2. Options
-D: used to define the delimiter. The default Delimiter is the tab key, which is used with-f.
-F: The field to be retrieved. Separate the fields according to-D.
-C: Take the character (characters) as the single bit to retrieve the fixed metaspace; the value after-C specifies the number of characters to be output.
The-C and-F parameters can be described as follows:
N nth character or field
N-from the first character or field to the end of the file
N-M from N to M characters or fields
-M: From the first character to the MB character or field
3. Example
Echo $ PATH | cut-D:-F 3rd // fetch 5th rows and rows
Last | cut-D ''-F 1
Last | cut-C 9-15
Last | cut-C 9-
Last | cut-d ""-F 1 | sort | uniq
Last | cut-d ""-F 1 | sort | uniq-C
Reference
[1]Http://doc.linuxpk.com/425.html
[2]Http://linux.vbird.org/linux_basic/0320bash.php#split