X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Kevin Markle <kmarkle@pbs.org>
Subject:  Re:  Doing additions in cygwin?
Date:  Thu, 22 Mar 2007 16:45:14 -0400
Lines: 28
Message-ID:  <mn.b3ed7d73dcd23a54.51129@pbs.org>
References:  <mn.b3b57d733ae76d53.51129@pbs.org> <297343D29C14AA4D822142893ABEAEF302E4D041@srv1163ex1.flightsafety.com>
Reply-To: kmarkle@pbs.org
Mime-Version:  1.0
Content-Type:  text/plain; charset="iso-8859-15"; format=flowed
Content-Transfer-Encoding:  8bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

It happens that Thrall, Bryan formulated :
> Kevin Markle wrote on Thursday, March 22, 2007 2:49 PM:
>> Hello,
>> 
>> I'm attemping to use the expr variable and am having problems. when I
>> type test=expr 1+1 or
>> test=`expr 1+1` or
>> test='expr 1 + 1' or
>> 
>> with and without quotes?? I just want to create a variable based on
>> and expression?
>
> (1) You didn't really describe what problems you're seeing (I think I
> know what they are, though).
>
> (2) expr wants separate arguments, like "expr 1 + 1", not "expr 1+1".
>
> (3) use backtics to get the output when you set the variable:
> "test=`expr 1 + 1`", not "test='expr 1 + 1'".
>
> (4) This isn't really Cygwin-specific, so it would be better to try "man
> expr" (for how to use expr) or "man bash" (for quoting rules).
>
> Hope this helps!

I tryed it your way and it worked as well thanks again!




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

