New to SCO (and UNIX) ksh question

New to SCO (and UNIX) ksh question

Post by E » Fri, 06 Nov 1998 04:00:00



I have been programming for the last 10+ years in clipper (dos world),
and Delphi (Windows).  I decided to finally go back and take a
UNIX/C/C++ course.  In the course, they gave us SCO Openserver
(v5.0.4?).

This week we are doing shell scripting.  Since I already have been
programming, I decided to buy a book and read about a lot of things
that we are not going to get to.  The book, 'Hands-On KornShell93
Programming' by Barry Rosenberg was recommended by several professors
and people that were already programming scripts in UNIX.

After reading through, I was happy to see that the script language had
more power than we were being taught. One thing I was happy about was
that there were variable types, not just strings.

My problem is:  I tried using float variables.  

float x=3.4

When I run the script, I get an error message, something about float
doesn't exist or something like that.  I thought float might just be
an alias for typeset [ -En -Fn ], so I tried typeset and it turned the
numbers into binary (very weird)

float x=5.0

echo $x    # returns 2#101

if ....
   (( x = x / 2 ))

Does this mean that I do not have KornShell93 ?

Thanks in advance
ED

 
 
 

New to SCO (and UNIX) ksh question

Post by Jean-Pierre Radle » Fri, 06 Nov 1998 04:00:00


Ed averred (on Thu, Nov 05, 1998 at 11:38:24AM +0000):
|                                   The book, 'Hands-On KornShell93
| Programming' by Barry Rosenberg was recommended by several professors
| and people that were already programming scripts in UNIX.
|
| After reading through, I was happy to see that the script language had
| more power than we were being taught. One thing I was happy about was
| that there were variable types, not just strings.
|
| My problem is:  I tried using float variables.  
|
| float x=3.4
|
| When I run the script, I get an error message, something about float
| doesn't exist or something like that.
|
| Does this mean that I do not have KornShell93 ?

Did you see if the word 'float' appears in the man page for ksh?

--


 
 
 

New to SCO (and UNIX) ksh question

Post by E » Sat, 07 Nov 1998 04:00:00




Quote:>Ed averred (on Thu, Nov 05, 1998 at 11:38:24AM +0000):
>|                                   The book, 'Hands-On KornShell93
>| Programming' by Barry Rosenberg was recommended by several professors
>| and people that were already programming scripts in UNIX.
>|
>| After reading through, I was happy to see that the script language had
>| more power than we were being taught. One thing I was happy about was
>| that there were variable types, not just strings.
>|
>| My problem is:  I tried using float variables.  
>|
>| float x=3.4
>|
>| When I run the script, I get an error message, something about float
>| doesn't exist or something like that.
>|
>| Does this mean that I do not have KornShell93 ?

>Did you see if the word 'float' appears in the man page for ksh?

float does not have a man page
 
 
 

New to SCO (and UNIX) ksh question

Post by Jean-Pierre Radle » Sat, 07 Nov 1998 04:00:00


Ed averred (on Fri, Nov 06, 1998 at 03:55:40AM +0000):

|
| >Ed averred (on Thu, Nov 05, 1998 at 11:38:24AM +0000):
| >|                                   The book, 'Hands-On KornShell93
| >| Programming' by Barry Rosenberg was recommended by several professors
| >| and people that were already programming scripts in UNIX.
| >|
| >| After reading through, I was happy to see that the script language had
| >| more power than we were being taught. One thing I was happy about was
| >| that there were variable types, not just strings.
| >|
| >| My problem is:  I tried using float variables.  
| >|
| >| float x=3.4
| >|
| >| When I run the script, I get an error message, something about float
| >| doesn't exist or something like that.
| >|
| >| Does this mean that I do not have KornShell93 ?
| >
| >Did you see if the word 'float' appears in the man page for ksh?
| float does not have a man page

Wake up, man, wake up!
Who said anything about a man page for float?
I wrote, "in the man page for ksh"!

--

 
 
 

New to SCO (and UNIX) ksh question

Post by Mike Hopkirk(ho » Sun, 08 Nov 1998 04:00:00



>UNIX/C/C++ course.  In the course, they gave us SCO Openserver
>(v5.0.4?).

>This week we are doing shell scripting.  Since I already have been
>programming, I decided to buy a book and read about a lot of things
>that we are not going to get to.  The book, 'Hands-On KornShell93
>Programming' by Barry Rosenberg was recommended by several professors
>and people that were already programming scripts in UNIX.
>Does this mean that I do not have KornShell93 ?

Correct.

The ksh on OSr5 is ksh88
Version 11/16/88g  specifically

UW7 has ksh93 (Version M-12/28/93e-SCO)

I've been thinking about a backport but thats as far as its got to date ...
--
- hops

Everything disclaimed (including disclaimer)

Mike Hopkirk (hops)  |       Whenever possible steal code.
SCO Inc              |          Tom Duff. (ex) Bell Labs

 
 
 

New to SCO (and UNIX) ksh question

Post by Andrew Smallsha » Tue, 10 Nov 1998 04:00:00



> I've been thinking about a backport but thats as far as its got to date ...

ISTR that Bell Labs are giving away the 'offical' ksh93 for a range of
platforms, including SCO OpenServer.  I think I have a copy on some machine
somewhere.  Have a look at http://www.kornshell.com/download .

--
Andrew Smallshaw