Path: utzoo!mnetor!uunet!husc6!uwvax!umn-d-ub!umn-cs!ems!pwcs!elric!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: comp.unix.xenix Subject: Re: trouble with expr Message-ID: <113@hawkmoon.MN.ORG> Date: 7 Mar 88 14:03:54 GMT References: <717@yabbie.rmit.oz> Organization: One of the Eternal Champions - Richfield, Mn, USA Lines: 20 Keywords: expr,sco xenix,bug(?) Summary: you may need an escape.. try a backslash (see man page) In article <717@yabbie.rmit.oz>, radjg@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@hawkmoon.MN.ORG uunet!rosevax!elric!hawkmoon!det