I have comma seperated values in a flat file, example below:
RStndrd,Mer,1902 PAR GRN,ParentGroup,
I am interested in getting the third parameter from above, (1902 PAR GRN) in a variable called MyID...i am using the command below to get the third variable
MyID=`echo $line|cut -f3 -d ","`
but using the above command returns the value of MyID as just 1902
i want the value of MyID to be 1902 PAR GRN including all the spaces...how do i that??
any help will be greatly appreciated!