This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Problems with 'expr'


 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@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]