Skip to main content
2 of 2
useless use of cat and added some information what the command does

You can do this by piping the text through awk

awk '{print $1}' input.txt

This prints out the first entry of every line (entries are separated with spaces).

Mark Cohen
  • 1.4k
  • 9
  • 12