Stand With Ukraine

Friday, May 10, 2013

Bash: select a column from a file

If for example, you have a file with columns separated by spaces and you want to select a column of data from there, say number 9. This is easy to do in shell using the cut command (note that fields are indexed starting from 1):