trouble with expr
Derek E. Terveer
det at hawkmoon.MN.ORG
Tue Mar 8 00:03:54 AEST 1988
In article <717 at yabbie.rmit.oz>, radjg at yabbie.rmit.oz (Jordan Green) writes:
> I have been trying to use expr(C) to do some integer manipulation and find
> that I cannot get the multiplication to work.
> expr 2 * 3
> simply returns
> 2 * 3
The man page states that multiplication is performed by escaping (using a
backslash) the asterisk. Try this:
$ expr 2 \* 3
6
$ expr "2 * 3"
2 * 3
$ expr "2 \* 3"
2 \* 3
$ expr 2 * 3
expr: syntax error
--
Derek Terveer det at hawkmoon.MN.ORG uunet!rosevax!elric!hawkmoon!det
More information about the Comp.unix.xenix
mailing list