Re:Seven Unix Commands Every Data Scientist Should Know
by masklinn on Thursday March 07, 2019 @02:16AM
(#19326148)
> awk '{print $2,$4;}' is useful and easy to remember. $NF refers to the last field. FS is the variable to override the default field separator of white space. Here's an example of it's use. OFS is the output field separator.
Yeah also cut is just inconvenient, awk works much better when working with the usual tabulated data.
> Works on CSV files too with the right field separator.
Yeah also cut is just inconvenient, awk works much better when working with the usual tabulated data.
> Works on CSV files too with the right field separator.
You're probably better off using xsv though.