trouble with expr

James Van Artsdalen james at bigtex.UUCP
Sat Mar 5 06:45:21 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

I'll bet you're entering

$ expr "2 * 3"

instead of

$ expr 2 "*" 3

The first sees the single argument as a string, whereas the second sees
three arguments and an arithmetic expression.
-- 
James R. Van Artsdalen    ...!uunet!utastro!bigtex!james     "Live Free or Die"
Home: 512-346-2444 Work: 328-0282; 110 Wild Basin Rd. Ste #230, Austin TX 78746



More information about the Comp.unix.xenix mailing list