0
I only want to fetch Hi there and store it in a variable VAR1. So basically VAR1 should contain Hi there
VIEW_COL[1]="Hi there,USA,Y"
This is what i have tried so far.
Column_Display_Name=`echo ${VIEW_COL[$LoopViewCol]}|cut -d"," -f1|sed 's/^[ \t]*//;s/[ \t]*$//'`
But since there is a space between "hi" and "there" my command is not able to handle. Please help and let me know if i have asked something wrong in the question.
1This part
echo ${VIEW_COL[$LoopViewCol]}|cut -d"," -f1
returnsHi there
(if $LoopViewCol==1). What do you want/expect the sed part to do? – Nifle – 2015-01-07T12:05:40.053