delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/02/05/15:55:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
X-Received: by 10.180.101.99 with SMTP id ff3mr644076wib.21.1360097701831; Tue, 05 Feb 2013 12:55:01 -0800 (PST)
In-Reply-To: <9E285A913B6C6B4797EBAB83675F80D9058F95@NHC0EX52.goodrich.root.local>
References: <CAAoqyza3HaVrXFt+mAJWzjH=hjmz-0H0HtCCwK_1_qk4HoT=sw AT mail DOT gmail DOT com> <9E285A913B6C6B4797EBAB83675F80D9058F95 AT NHC0EX52 DOT goodrich DOT root DOT local>
Date: Tue, 5 Feb 2013 12:55:01 -0800
Message-ID: <CAN4-eH+XDWvGOLoAw5wGe+Hg+MZe=kc8wwTsF9w2bJkOFYb_ng@mail.gmail.com>
Subject: Re: Problem with Cygwin 1.7.17 + Bash and Grep...
From: Alan Thompson <thompson2526 AT gmail DOT com>
To: cygwin AT cygwin DOT com
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

Never heard of pspad, but I use Cygwin's dos2unix all the time for
this kind of thing.
Alan Thompson

On Tue, Feb 5, 2013 at 6:49 AM, Gates, Roger <Roger DOT Gates AT goodrich DOT com> wrote:
>
>
> >I'm essentially trying to take the contents of one file, and use it as
> >input for a grep command against another file, but I do not get any
> >results, even though I know the 2nd file contains a match.  In the
> >one-liner below, I include an "echo" to confirm the output is in the
> >variable that should be used with the grep command.
> >
> >[vmorales AT D630-Vmorales ~]# for i in `cat file-a.txt`; do echo $i;
> >grep $i file-b.txt; done
> >alpha
> >beta
> >charlie
> >delta
> >echo
> >
> >[vmorales AT D630-Vmorales ~]# grep charlie file-b.txt
> >charlie,13
>
> File-a.txt must be in DOS format. Try this.
>
> for i in `cat file-a.txt | d2u`; do echo $i;
> grep $i file-b.txt; done
> alpha
> beta
> charlie
> charlie,13
> delta
> echo
>
> Roger
>
>
>
> --
> 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
>

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