X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:reply-to :message-id:date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=M/08eakQlmKW0WwR jMNXv6UjaUX/H7LPgvw410Blqspqtf+MTwvhrFZLaAtW6URSX41NtJwnN+uHxmjJ NKnP47zWJKIslV3Oq4KtEMXgibX9Bz28Bjc64ZtldcJjw/URCWJcJyBd6HJhl8jl 1ZJFm7INZ2t7k4lfOY15fPzWQnA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:reply-to :message-id:date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=xqhsJk4XW8nokVjiU44/Ug gtJ5U=; b=hP4uPkC3vq+CdYlb6ca/C7Je9sD5KNs1HZBTRBG95BkjgqBSbR7lbF A9pq1r+OMrFMFsD6h+61NAJHDxmbyFkhCWB+t/cIUZppCk92xWefSzIeVso5r5LS yAHuvY7O6zlnPi2tBUWxRIDsXApZUjedDV6XBnhjSFdPFna9Eq8Fg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KAM_MXURI,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=prince, Prince, Karr, karr X-HELO: omr-a004e.mx.aol.com Reply-To: tprince AT intelretiree DOT com Subject: Re: Grep can't match characters before EOL marker without ^M To: cygwin AT cygwin DOT com References: From: "arrl via cygwin" Reply-To: arrl Message-ID: <00e694f3-1e50-24be-95dd-8b6bf2bb1323@aol.com> Date: Wed, 3 Jan 2018 13:39:21 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit x-aol-global-disposition: G x-aol-sid: 3039ac1add8e5a4d24cb2007 X-AOL-IP: 65.189.93.33 On 1/3/2018 12:31 PM, David Karr wrote: > My cygwin version appears to be "2.9.0(0.318/5/3)". > > If I have a text file that has a line that ends with "abc", and I try > to grep for "abc$", it doesn't match. I find that it does match "$" > and "abc^M$". > > I've read some of the documentation about line endings in Cygwin. > > I need to write some scripting that works on both Cygwin and Linux. > What do I need to do here? > Consider running dos2unix on files containing ^M at line ends. -- Tim Prince -- 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