|
| On 30 Nov., 02:38, use...@sta.samsung.com wrote:
> Kindly suggest the ksh equivalent of the following csh script snippet
>
> ##############################
> set presidents=(Washington Adams Jefferson Madison Monroe Qunicy-Adams
> Jackson)
>
> echo $presidents[1] $presidents[4-7]
> ##############################
What version of ksh are you using? Try one of...
set - Washington Adams Jefferson Madison Monroe Qunicy-Adams Jackson
echo $1 $4 $5 $6 $7
set - Washington Adams Jefferson Madison Monroe Qunicy-Adams Jackson
printf "%s" $1; shift 3; echo "$@"
set - Washington Adams Jefferson Madison Monroe Qunicy-Adams Jackson
echo ${@:1:1} ${@:4:4}
presidents=( Washington Adams Jefferson Madison Monroe Qunicy-Adams
Jackson )
echo ${presidents:1:1} ${presidents:4:4}
Janis
|
|