Unix Shell - Arrays doubts in KSH

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2007 > Arrays doubts in KSH





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Arrays doubts in KSH
apogeusistemas@gmail.com

2007-12-09, 1:25 pm

Hi:

How could I make this work in KSH ?
[vbcol=seagreen]
44
[vbcol=seagreen]

88

Thank You Masters !


Janis Papanagnou

2007-12-09, 7:21 pm

apogeusistemas@gmail.com wrote:
> Hi:
>
> How could I make this work in KSH ?
>
>
>
> 44
>
>
>
>
> 88
>
> Thank You Masters !
>
>


I cannot believe that in your example the above ((...)) works in ksh without
the $ in front of it. $(( ... )) is an expansion of an arithmetic expression
while (( ... )) is an arithmetic command; each apply in their own contexts
and cannot be interchanged arbitrarily.

Janis
Bill Marcum

2007-12-09, 7:21 pm

On 2007-12-09, apogeusistemas@gmail.com <apogeusistemas@gmail.com> wrote:
>
>
> Hi:
>
> How could I make this work in KSH ?
>
> 44

x=(11 22 33 44 55)
echo ${x[3]}
>
>

y=$((x[2] + x[4]))

Bobby.Higgins

2007-12-29, 1:28 pm

set -A x 11 22 33 44 44
echo ${x[3]}

<apogeusistemas@gmail.com> wrote in message
news:b7c2b738-4755-41f1-84e3-e46bcb67942c@b40g2000prf.googlegroups.com...
> Hi:
>
> How could I make this work in KSH ?
>
> 44
>
>
> 88
>
> Thank You Masters !
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com