Shell programming cut
Cut refers to the unit of action in the file. Based on the conditions you set, part of the content is cut and printed out. Output to standard output, not saved to any file
-B Range: determined by byte range-c range: determined by character range-f range: determined by set field range. By default, the field is split by TAB. Use-d to specify.
The range is set to n-bit cut content. -N: Cut the content of 1-n bits. N-cut the content of n-last bit. N-m cut the content of n-m bit
-D': 'specifies the delimiter. -S only prints rows with delimiters. -- Out = delimiter = string specifies the delimiter output, which can be used to format the output.
The difference between-B and-c is the difference between characters and bytes. Bytes are the smallest unit stored in the computer. Character is an independent unit in the encoding. For example, a Chinese character or punctuation in the Chinese character code, or a letter or punctuation in the acⅱ code. Therefore, a single character may contain one or more bytes. That's the relationship.
Example: cut-d': '-f 2-3-s/etc/passwd