delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
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 |
Message-ID: | <F76C9B2DA2FC4C4CA0A18E288BBCBCF708217C85@nihexchange24.nih.gov> |
From: | "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder AT niaid DOT nih DOT gov> |
To: | cygwin AT cygwin DOT com |
Subject: | RE: grep: $ in PATTERN doesn't seem to work properly |
Date: | Sat, 21 Aug 2004 12:29:18 -0400 |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Sounds like a it could be a line ending issue where grep is expecting \n (^J) at the end of a line but is being fed \r\n (^M^J). Does $ od -c tmp show \r\n line endings? How do the following work for you? $ grep '1.$' tmp and $ grep -v '^.$' tmp -----Original Message----- From: Koduru, Seshasai [mailto:Seshasai DOT Koduru AT ca DOT com] Sent: Saturday, August 21, 2004 11:43 AM To: cygwin AT cygwin DOT com Subject: grep: $ in PATTERN doesn't seem to work properly Hi, When $ is used in the PATTERN of grep command, it doesn't seem to work properly on my machine. I have run the following under cygwin.bat shell. $ cat tmp Line 1 Line 2 Line 3 Line 4 Line 5 $ grep '1$' tmp (Gives no output. It should give output as Line 1) $ grep -e '1$ tmp (Gives no output. It should give output as Line 1) $ grep -v '^$' tmp (Gives no output. It should give output as Line 1 Line 2 Line 3 Line 4 Line 5) I am also attaching the output of "cygcheck -s -v -r". Can someone please tell what's going wrong? Install problem or other? Thanks, Seshasai -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |