Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-Id: <B0016988466@mzdy17.allegro.net>
From: "Fleischer, Karsten (K.)" <kfleisc1@ford.com>
To: "'jens@uniweb.se'" <jens@uniweb.se>
Cc: "Cygwin (E-mail)" <cygwin@sourceware.cygnus.com>
Subject: RE: Problems with 'expr'
Date: Thu, 21 Sep 2000 09:48:02 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2651.58)
Content-Type: text/plain;
	charset="iso-8859-1"

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@uniweb.se [mailto:jens@uniweb.se]
> Sent: Donnerstag, 21. September 2000 14:32
> To: cygwin@sources.redhat.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@sourceware.cygnus.com
> 
> 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

