split the string "Setview: arv-temp-view"

Hi experts,

I would like to split the value of v and assign "arv-temp-view" to another variable d. I want to do it within shell script. My shell is "tcsh"

v="Setview: arv-temp-view"

split v and store

d=arv-temp-view

Please help

Thanks

Amit

Try this one out....
d=`echo $v | awk -F":" '{ print $2}'`
echo $d
arv-temp-view
else
d=`echo $v | awk '{ split($0, s, ":"); print s[2]}'`
echo $d
arv-temp-view

Thanks Manas..:slight_smile:

It worked

Amit