I am trying to print the second part of a comma delimited string 28213
. What am I doing wrong?
#!/bin/bash
file="4646484726,28213,93951656,Jameson Booker,10000043,Domain,60008494,Amarr VIII (Oris) - Emperor Family Academy,10,True,583000.0,100,71.0,2016-10-04 13:49:51.000,0,1,60618962,90,False,30002187,Amarr,7688312.5,"
echo "$file"|sed s/,/\\n/g | awk '{print $2}'
I understand that sed
is splitting the string into chunks by comma, and that awk
is then returning only strings with spaces in them so Jameson Booker
returns Booker
, but I do not know how to split and return values for the entire line, not just the comma separated values.