X-Spam-Check-By: sourceware.org
Date: Tue, 3 Apr 2007 15:05:28 -0700
From: Gary Johnson <garyjohn@spk.agilent.com>
To: cygwin@cygwin.com
Subject: Re: grep and exact matches help..
Message-ID: <20070403220528.GA12449@suncomp1.spk.agilent.com>
Mail-Followup-To: cygwin@cygwin.com
References: <mn.1b2c7d742b4ca532.51129@pbs.org> <019001c77617$8e0eabc0$2e08a8c0@CAM.ARTIMI.COM> <mn.1b487d74cbed7dfa.51129@pbs.org> <796F3459-CF33-4CFD-A8A9-6C137F07CD0D@rehley.net> <mn.1b2c7d742b4ca532.51129@pbs.org> <019001c77617$8e0eabc0$2e08a8c0@CAM.ARTIMI.COM> <mn.1b487d74cbed7dfa.51129@pbs.org> <019601c7761e$2c2531c0$2e08a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <796F3459-CF33-4CFD-A8A9-6C137F07CD0D@rehley.net> <019601c7761e$2c2531c0$2e08a8c0@CAM.ARTIMI.COM>
User-Agent: Mutt/1.5.12 (2006-07-14)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On 2007-04-03, Dave Korn wrote:

>   BTW2, I assume we're still talking about your script from before.
> Seriously, use "ls -1" rather than "ls -l" (that is, use a one instead of an
> L), because then you get /just/ the filenames, one per line, and won't have to
> worry about parsing the name out from amongst all those permission flags and
> datestamps.

On 2007-04-03, Peter Rehley wrote:

> Here is one possible solution
> 
> ls -1a | grep winops | grep -v winops-hp
> 
> or maybe this
> 
> ls -1a | sed -e '/winops-hq/d'

If you're piping 'ls' into another command, the -1 isn't necessary.  
'ls' detects that its stdout is not a tty and delivers single-column  
output automatically.

Regards,
Gary

-- 
Gary Johnson                 | Agilent Technologies
garyjohn@spk.agilent.com     | Mobile Broadband Division
                             | Spokane, Washington, USA

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

