bug-sh-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in Command "expr"


From: Bob Proulx
Subject: Re: Bug in Command "expr"
Date: Fri, 7 Jun 2002 14:06:52 -0600
User-agent: Mutt/1.3.28i

>    Hi. I'm from Brazil. My name is Carlos Fontoura. I'd like to report 
> a bug in "expr" command. I couldn't execute the following line:
> 
>                    expr 3 * 3
> 
>    Maybe there's something I'm forgetting to do. I hope so.

Yes, you are forgetting that * is a shell wildcard.

Try this:

  echo expr 3 * 3

What do you see?  Does that look like valid syntax to the expr
command?  If you were the expr command would you know what the user
wanted?

Quote the * to keep the shell from expanding it.

  expr 3 '*' 3

This is a pointer to a similar FAQ.

  
http://www.gnu.org/software/fileutils/doc/faq/core-utils-faq.html#ls%20-a%20*%20does%20not%20list%20dot%20files

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]