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

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

Re: BUG in expr command


From: Bob Proulx
Subject: Re: BUG in expr command
Date: Mon, 7 Oct 2002 13:01:04 -0600
User-agent: Mutt/1.4i

>    I would kindly bring to your notice an error in the functionality of the 
> shell program 'expr'. The program malfunctions whenever we try to evaluate an 
> expression containing the symbols '<' or '>'. After hours of debugging, I 
> noticed that the Unix shell by default uses these symbols for redirection, so 
> the command never gets to see these symbols. So, inspite of the mention of 
> the symbols in the manual documenation and the in-file documentation, i.e. 
> using the 'expr --help' command, the functionality of those is not realised.

Sorry you had such difficulty using expr.  The command is one of the
oldest of the unix command set and has a syntax required by legacy
programs.

The man page for expr shows:

       Beware  that  many  operators need to be escaped or quoted
       for shells.

Try this:

  expr 2 '<' 3

Bob




reply via email to

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