From: Weiqi Gao Newsgroups: comp.os.msdos.djgpp Subject: Re: a good expr for dos? Date: Thu, 05 Aug 1999 19:59:39 -0500 Organization: CRL Network Services Lines: 28 Message-ID: <37AA337B.432FB4D0@a.crl.com> References: <808AC89C053FE1A5 DOT D5D223F7B99B2E46 DOT 30EF7E9024856B46 AT lp DOT airnews DOT net> NNTP-Posting-Host: a116004.stl1.as.crl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.36 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com - carlo - wrote: > > Can anyone recommend a good expr for dos? > Preferebly one that will run on OpenDOS without csDPMI, however. > I've found several good ones, but not yet one that will evaluate expressions > like 3>1. The one in ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/shl112b.zip does expressions like 3>1 just fine. You simply have to note that the greater than sign (>) is a special character for the shell and need to be properly escaped. In COMMAND.COM: D:\TEMP> expr 3 ">" 1 1 D:\TEMP> expr 3 "<" 1 0 In bash: /temp $ expr 3 \> 1 1 /temp $ expr 3 \< 1 0 -- Weiqi Gao weiqigao AT a DOT crl DOT com