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

You can do this by piping the text through awk

cat input.txt | awk '{print $1}' input.txt

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

You can do this by piping the text through awk

cat input.txt | awk '{print $1}'

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).

Source Link
Mark Cohen
  • 1.4k
  • 9
  • 12

You can do this by piping the text through awk

cat input.txt | awk '{print $1}'