delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/21/10:25:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 21 Sep 2000 17:50:31 +0330 (GMT+03:30)
From: jens AT uniweb DOT se
Subject: RE: Problems with 'expr'
To: cygwin AT sources DOT redhat DOT com
Message-id: <465983737.969546031303.JavaMail.root@colin.uniweb.se>
MIME-version: 1.0
X-Mailer: Sun(TM) Web Access 1.2

 Hi,

 Silly me. How could I forgett/miss that. It's just
that expr is not something I normaly use. So I did
not think of that when I tried it out.

 Thanks.

 Jens Yllman

>Hi Jens,
>
>Use quotes around * and (, like
>
>expr 3 '*' 4
>
>Otherwise bash will expand * to all the files in the current dir.
>( has special meaning to bash, too.
>
>expr '3 * 4'
>
>on the other hand, is evaluated to the string "3 * 4"
>
>See bash's manpage.
>
>Karsten
>
>> -----Original Message-----
>> From: jens AT uniweb DOT se [mailto:jens AT uniweb DOT se]
>> Sent: Donnerstag, 21. September 2000 14:32
>> To: cygwin AT sources DOT redhat DOT com
>> Subject: Problems with 'expr'
>> 
>> 
>>  Hi,
>> 
>>  I tried to use 'expr'. And it worked fine for this
>> 'expr 1 + 2 + 3'. But if I try to use '(' or '*' it
>> will print 'expr: syntax error'. Shouldn't the
>> following work? 'expr 3 * 4'?
>> 
>>  Jens Yllman
>> 
>> --
>> Want to unsubscribe from this list?
>> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>> 
>> 
>

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019