Hi gurus,
I need to set up an array like this
set - A arr 'A', 'B'
The output of this array should be like this 'A','B'
Right now, I get the output like this 'A B'
Can anyone suggest me on how to achieve this.
thanks
Hi gurus,
I need to set up an array like this
set - A arr 'A', 'B'
The output of this array should be like this 'A','B'
Right now, I get the output like this 'A B'
Can anyone suggest me on how to achieve this.
thanks
Hi,
You have to do something like this to acheive this...
typeset -a Arr
Arr[1]=\'A\'
Arr[2]=\'B\'
echo ${Arr[1]} ${Arr[2]}
Will give you the desired o/p.
Works for me...
$ cat array
#! /usr/bin/ksh
set -A arr A B
echo first ${arr[0]}
echo second ${arr[1]}
exit 0
$ ./array
first A
second B
$
thanks a lot for your help guys. i was able to get it either ways..