delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/24/13:47:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Fri, 24 Sep 2010 19:47:33 +0200
From: Spiro Trikaliotis <an-cygwin AT spiro DOT trikaliotis DOT net>
To: cygwin AT cygwin DOT com
Message-ID: <20100924174733.GA4853@trikaliotis.net>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <79eb8d2be6552119c923d635791104be DOT squirrel AT orangepalantir DOT org> <4C9CB819 DOT 9010308 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4C9CB819.9010308@redhat.com>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-SA-Exim-Connect-IP: 79.213.209.159
X-SA-Exim-Mail-From: an-cygwin AT spiro DOT trikaliotis DOT net
Subject: Re: backtics
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: No (on trikaliotis.net); Unknown failure
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

* On Fri, Sep 24, 2010 at 08:39:21AM -0600 Eric Blake wrote:
> On 09/24/2010 07:43 AM, melkor AT orangepalantir DOT org wrote:
>> This probably isn't a backtic problem, but using backtics causes it.
>>
>> ls `ls`
>>
>> results in file not found errors. ie:
>>
>> bash-3.2$ ls
>> 35ms  40ms  80ms
>> bash-3.2$ ls `ls`
>> ls: cannot access 35ms: No such file or directory
>> ls: cannot access 40ms: No such file or directory
>> ls: cannot access 80ms: No such file or directory
>> bash-3.2$
>
> WJFFM:
> $ mkdir abc && cd abc && touch 35ms 40ms 80ms
> $ ls
> 35ms  40ms  80ms
> $ ls `ls`
> 35ms  40ms  80ms

Another option (for the OP):

Have you tried the command:

$ ls|wc -l


You ask why? Then try this:

$ touch "35ms  40ms  80ms"
$ ls `ls`
ls: cannot access 35ms: No such file or directory
ls: cannot access 40ms: No such file or directory
ls: cannot access 80ms: No such file or directory

Here, ls|wc -l gives 1 as output.

HTH,
Spiro.

-- 
Spiro R. Trikaliotis                              http://opencbm.sf.net/
http://www.trikaliotis.net/                     http://www.viceteam.org/

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

- Raw text -


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