> I am writing a script and appear completely unable to employ expr.
> 
> It works for plus but for no other operators. I need *.

Are you forgetting that * is a shell metacharacter and would need to
be protected from shell expansion?  Check this with echo.

  echo expr 2 * 3

You want to quote the * by any of the shell quoting methods.

  echo expr 2 '*' 3
  echo expr 2 "*" 3
  echo expr 2 \* 3

The same goes for other shell metacharacters as well.  Check out the
man page or info page on your shell.  'info bash'

Hope that helps

Bob

_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils

Reply via email to