Cut is a command for cutting files, simply fetching columns
Cut common Command parameters
-B,--bytes=list Select only these bytes-c,--characters=list Select only these characters-d,--delimiter=del IM use DELIM instead of the TAB for field delimiter-f,--fields=list select 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--complement Comple ment the set of selected bytes, characters or fields-s,--only-delimited do not print line s 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 inform ation and exit
Common Command Display
Set a specific cut character to take a specific column
Cut-d '/'-f3 logs.txt set/For the cut character- F denotes the first column, where the third column is taken
Find a specific number of characters
Replace content within file: Source file is not affected
TR ' var ' log ' < logs_bak.txt| Head-3
Linux Cut Command Detailed