Hi, all
I need your help and suggestions.
I want to print particular strings in a field of a csv file and show them in terminal. Here is an example of the csv file.
SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw
/home/intannf/nu/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92
/home/intannf/up/folder/new/IMAG0399.JPG,1.14,-7.78805,110.37457,30.53,997.44,139.93,186.60,175.61,184.11
/home/intannf/me/DSC122.jpg,0.80,-7.78805,110.37457,30.64,998.83,127.60,171.19,227.02,7.66
Output required
2015_0313_090651_219.JPG
IMAG0399.JPG
DSC122.jpg
When i tried to print them using this code:
awk -F "[/,]" 'NR>1 {print $5}' $file
I get the wrong result like this:
2015_0313_090651_219.JPG
new
0.80
because it just print the fifth column, and each of them has different column.
Would you mind to help me to solve it? I really need your help. Thanks in advance.
Regards,
Intan