Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Very Simply KSH Question

Re: Very Simply KSH Question

From: Mladen Gogala <mgogala_at_allegientsystems.com>
Date: Tue, 05 Apr 2005 15:27:10 -0400
Message-ID: <4252E68E.8090607@allegientsystems.com>


Post, Ethan wrote:

>This works on my Solaris server, when I run on my web host (not sure
>what OS) it will not set X and Y. Both are using ksh. Is this related
>to ksh versions or is this a stupid way to set multiple variables from a
>deliminated list?
>
> echo 2 4 | read X Y
> echo $X
>2
> echo $Y
>4
>--
>http://www.freelists.org/webpage/oracle-l
>
>

It is a stupid way to set multiple variables from a deliminated list. Smart way would be this:

$ let A=2;
$ let B=3
$ let C=$A*$B
$ echo $C

6
$ echo $SHELL
/bin/ksh
$
-- 
Mladen Gogala
Oracle DBA
Ext. 121


--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 05 2005 - 15:31:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US