X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <18725646 DOT post AT talk DOT nabble DOT com> <009601c8f226$8f3344c0$9601a8c0 AT CAM DOT ARTIMI DOT COM> Subject: RE: Can't use special characters \n or \r Date: Wed, 30 Jul 2008 14:47:36 +0100 Message-ID: <001e01c8f24a$d3292590$9601a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: 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 Mark J. Reed wrote on 30 July 2008 14:25: > On Wed, Jul 30, 2008 at 5:28 AM, Dave Korn wrote: >> Normal grep and sed don't speak C-style escape chars. > > Actually, sed does: You omitted a vital qualifier from my earlier post ... >> it all gets tangled up in the matching against end-of-line $ anchor ... without which you are not accurately representing what I was saying there. > $ sed -e 's/\r//' foo.txt | od -c > 0000000 T h i s i s a t e s t . \n > 0000020 Yes, very good. Now try it with \n. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/