delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/13/19:13:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020313160836.02aec6d0@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Wed, 13 Mar 2002 16:13:10 -0800
To: Andrew DeFaria <ADeFaria AT Salira DOT com>, cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: Incorrect expression evaluation?
In-Reply-To: <3C8FE0DD.6000009@Salira.com>
Mime-Version: 1.0

Andrew,

I cannot reproduce your result unless I do this:

% x="-l -d"
% ls "$x"
ls: invalid option --
Try `ls --help' for more information.


I tried using hard (single) quotes for the variable setting command, but 
the result is the same. Likewise for $'-l -d'.

I also tried using /bin/sh (ash, I believe), but again I cannot reproduce 
your erroneous result.


I tempted to chalk this up to some kind of operator error...

Randall Schulz
Mountain View, CA USA


At 15:29 2002-03-13, Andrew DeFaria wrote:
>Perhaps this is more of a bash problem than a Cygwin problem however 
>Cygwin's bash is not acting like bash on Solaris. In Cygwin's bash:
>
>$ x="-l -d"
>$ ls $x
>ls: invalid option --
>Try `ls --help' for more information.
>
>Now on Solaris (also running bash):
>
>$ x="-l -d"
>$ ls $x
>drwxr-xr-x   4 adefaria other        512 Feb 22 15:13 ./
>
>What gives?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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