Bash and Linux 5 · Searching and text
Print one column
Print the second whitespace-separated column of each line.
awk '{print $2}' file.txt
Official Bash and Linux 5 documentation
More searching and text commands
- Search file contents
- Find files by name
- Find files changed recently
- Count lines
- Count duplicate lines
- Replace text in a file
All searching and text commands · Bash and Linux 5 cheatsheet