delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/10/06:27:30

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
Date: Fri, 10 Sep 2004 12:27:54 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: sed-4.1.2-1: backslash in 'i' and 'a' changed?
Message-ID: <20040910102754.GA2559@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <KCEOLMMHICICJKHPFOALOEILCIAA DOT Jan DOT Schormann AT BrainLAB DOT com>
Mime-Version: 1.0
In-Reply-To: <KCEOLMMHICICJKHPFOALOEILCIAA.Jan.Schormann@BrainLAB.com>
User-Agent: Mutt/1.4.2i

On Sep 10 10:06, Jan Schormann wrote:
> Hi,
> 
> try this:
> 
>  $ echo | sed -e 'a\\'
> 
> in sed-4.0.9-2 and sed-4.1.2-1: The old one produces a backslash,
> the new one doesn't. Unfortunately, this breaks a makefile I use
> for generating LaTeX output ...
> 
> Can this be a side effect of the change described below? Will this
> be stable or is it a bug?

I'd guess this is a stable fix.  From `info sed':

  `a\'
  `TEXT'
       [...]
       Escape sequences in TEXT are processed, so you should use `\\' in
       TEXT to print a single backslash.

It looks like the old behaviour is a bug, not the new one.  Try
  echo | sed -e 'a\\\'
with the old version.  It will also print just one backslash.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019