X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19IDkQbwYxec1WMs76PNHtX Date: Wed, 13 Feb 2013 12:44:11 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Is this a bug or a behavior? Message-ID: <20130213174411.GA4176@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <511BBBD4 DOT 8090902 AT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, Feb 13, 2013 at 04:55:01PM +0000, Adam Dinwoodie wrote: >Jack Radigan wrote: >> Using the following script: >> #!/bin/bash >> set -x >> cat << eof | `ls /bin | grep "^grep$"` alpha >> alpha >> omega >> eof > >Easier repro showing this phenomena: > > ls /bin | grep '^grep$' > >On Linux, you'll get "grep" as output. Cygwin won't output anything. Yep, but if you want to write code that will work on both *nix and Cygwin you could do this: ls /bin | sed -n -e 's/\.exe$//' -e '/grep/p' That works on both Cygwin and Linux. cgf -- 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