wiki:linux/Tools/cut

cut, find, ps, rev, tail, watch


see also Replace extension of several files, example within dpkg entry


10 Practical Linux Cut Command Examples to Select File Columns
(unix shell scripting) Trim last 3 characters of a line WITHOUT using sed, or perl, etc


Examples

Cut the third col in a line delimited by whitespaces

$ cut -d " " -f3
col1 col2 col3 col4 col5
col3

Cut the third char

$ cut -c 3
abcdef 
c

Cut the third till the fifth char

$ cut -c 3-5
123456789
345
Last modified 5 years ago Last modified on Jan 15, 2015, 9:38:42 AM