How do I print a column in Linux?

Kim Trang

New member
How do I print a column in Linux?
Answer
How to do it…
  1. To print the fifth column, use the following command: $ awk ‘{ print $5 }’ filename.
  2. We can also print multiple columns and insert our custom string in between columns. For example, to print the permission and filename of each file in the current directory, use the following set of commands:
 

Tìm kiếm

Back
Top