I tried to loop comma separated values with space, but not able to get the exact value since it has space in the string.
I tried in different ways, but i not able to get desired results. Can anyone help me on this
#!/bin/ksh
values="('A','sample text','Mark')"
for i in `echo $values | sed 's/[)(]//g' | sed 's/,/ /g'`
do
echo $i
done
My expected output is:
A
sample text
Mark