[comp.unix.xenix] expr broken ?

rob@lafayet.UUCP (Rob Freyder) (08/24/90)

I am running SCO Xenix 386 2.3.3 ... expr gives a syntax error if you try
to use the * operator.  example

expr 5 * 2

The above gives a syntax error whereas

expr 5 + 2 

gives 7 as you would expect.  The documentation says that * is the
multiplication operator... Can anybody else verify this error ?

For what it is worth, the divide operator works fine.
-- 
Rob Freyder                                  Core Laboratories a division of
____    ____     ____                        Western Atlas International Inc.
\   \  /   /\   /   /\                       =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 \   \/   /  \ /   /  \                      Humans     (318) 235-9431
  \  /   / \  /   /\   \                     Internet   rob@lafayet.UUCP
   \/___/   \/___/  \___\                    Bang    ...!uunet!rouge!lafayet!rob

michael@yonder.UUCP (Michael E. Haws) (08/25/90)

In article <578@lafayet.UUCP>, rob@lafayet.UUCP (Rob Freyder) writes:
> I am running SCO Xenix 386 2.3.3 ... expr gives a syntax error if you try
> to use the * operator.  example
> 
> expr 5 * 2

Just a wild guess but I suspect the '*' needs to be escaped. Try

expr 5 \* 2
-- 
Michael E. Haws             "Keep the blue side up"          w - (303) 986-2370
boulder!yonder!michael                                       h - (303) 232-0628

md@sco.COM (Michael Davidson) (08/25/90)

In article <578@lafayet.UUCP> rob@lafayet.UUCP (Rob Freyder) writes:
>I am running SCO Xenix 386 2.3.3 ... expr gives a syntax error if you try
>to use the * operator.  example
>
>expr 5 * 2
>
Actually this works just fine if there are no files in your current
directory .... For a more general solution try the following:

expr 5 \* 2