5 examples for cut

{{ score }}
  # To parse the word sir (using the ' ' as a delimeter, the choosing the second word) 
echo "hello sir" | cut -d' ' -f2
{{ score }}
  # get the first 5 character of a string
echo 'do you even cut bro?' | cut -c1-5
{{ score }}
  # use `col` to format an output so you can select the third string using the default tab as a delimeter 
who | col | cut -f3
{{ score }}
  # Example 4 has used the program "col" for setting tabs as field
# delimiters.  Not bad, but there is another way to do it with the
# stream editor "sed".
who | sed -E 's/ {2,}/\t/g' | cut -f3

# You can compare the results, the way the tabs are set using either
# col or sed, with the following two commands.
who | col | od -a

who | sed -E 's/ {2,}/\t/g' | od -a
{{ score }}
  # Extraer un fragmento de un archivo
cut -d: -f1 /etc/passwd

# Extraer un fragmento de un archivo y ordenarlo de forma inversa
cut -d: -f1 /etc/passwd | sort -r