unix - read specific field values from a .csv file from korn script -


how read specific field values .csv file using korn script.

say input follows:

first_name      lastname    dept    collge ravi            shangar     csc xxx ram             devi        csc zzz raj                 shangar         csc     yyy 

so need extract distinct lastname values.any suggestions?

you can use awk second column follows:

$ awk '{print $2}' file lastname shangar devi 

awk uses whitespace delimiter default, can change if necessary using -f option.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -