Linux cut command
Syntax
cut options [file]
說明
將檔案一列列的讀入,並把符合條件的部份,印到標準輸出(standard uotput).

如果不指定任何的檔案名稱的話,或給予的檔案名為 "-" ,則cut指令會從標
準輸入(standard in)讀入資料.

#cut --help 後的內容如下


  Usage: cut [OPTION]... [FILE]...
Print selected parts of lines from each FILE to standard output.

Mandatory arguments to long options are mandatory for short options too.
  -b, --bytes=LIST        output only these bytes
  -c, --characters=LIST   output only these characters
  -d, --delimiter=DELIM   use DELIM instead of TAB for field delimiter
  -f, --fields=LIST       output only these fields;  also print any line
                            that contains no delimiter character, unless
                            the -s option is specified
  -n                      with -b: don't split multibyte characters
  -s, --only-delimited    do not print lines not containing delimiters
      --output-delimiter=STRING  use STRING as the output delimiter
                            the default is to use the input delimiter
      --help     display this help and exit
      --version  output version information and exit

Use one, and only one of -b, -c or -f.  Each LIST is made up of one
range, or many ranges separated by commas.  Each range is one of:

  N     N'th byte, character or field, counted from 1
  N-    from N'th byte, character or field, to end of line
  N-M   from N'th to M'th (included) byte, character or field
  -M    from first to M'th (included) byte, character or field

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-coreutils@gnu.org>.



-b , --bytes=LIST(輸出範圍) 1.以byte為單位,範圍以每列的行為準,  例如指定輸出範圍是"8"就會顯示每列第8行的字元.
2.如果指定的為"8-"則會顯示每列第8行到最後一行的所有字元.
3.如果指定的為"-8"則會顯示每列第1行到第8行的所有字元.
4.如果指定的為"2-5"則會顯示每列第2到5行的所有字元.
5.如果指定的為"2,5"則會顯示每列第2跟第5行的字元.
6.跳格(Tab)跟倒退(Back Space),都視為一個byte.
-c, --characters=LIST(輸出範圍) 以字元為單,範圍以每列的行為準,效果跟-b類似,跳格(Tab)跟倒退(Back Space),都視為一個byte.
-d, --delimiter=DELIM(分界字元) 指定欄位的分界字元預設以跳格 (TAB)當作欄位的分界字元,也可以自己定義要以哪 個字元來分界.
這個參數需配合 "f" 才能使用.
-f, --fields=LIST(輸出範圍) 設定預輸出至標準輸出設備的範圍,以欄為單位範圍則以每列的欄為準,預設以跳格(Tap)當作欄位的字元
-s, --only-delimited(定義符號) 如果該列沒有分界字元的存在則不輸出該列的內容.
這個只能配合 -f參數使用
--help 線上說明文件
--version 看版本