delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/03/21/20:16:17

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <034a01bf939b$fa1d4760$0a32a8c0@rainsound.com>
Reply-To: "Michael O'Brien" <mobrien AT pixar DOT com>
From: "Michael O'Brien" <mobrien AT pixar DOT com>
To: <cygwin AT sourceware DOT cygnus DOT com>
Cc: "Michael O'Brien" <mobrien AT pixar DOT com>
Subject: odd sed behavior
Date: Tue, 21 Mar 2000 17:14:28 -0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300

Hola~

When using the 20.1 version of cygwin, I'm seeing the following
strange-ness. From the command prompt:

    F:\>sort  -u  a.msg  |  sed 's/[\\"]/\\&/g;s/.*/\"&\",/'
    sed: -e expression #1, char 21: Unterminated `s' command
    The system cannot find the path specified.

    F:\>sort  -u  a.msg  |  sed 's/[\\"]/\\&/g;s/.*/&,/'

Removing the " from the second s// command to sed, the thing works. I've
tried nearly every way I can think of to escape the " (""", \", \\", '"',
etc). I can't figure out a way that works.

    F:\>sort  -u  a.msg  |  sed 's/.*/\"&\",/'

Removed the first s// from the sed command, the thing works.

    F:\>sort  -u  a.msg  | sed 's/[\\"]/\\&/g'

Removing the second s// command, the thing works.

    F:\>sort  -u  a.msg  |  sed 's/[\\"]/\\&/g' | sed 's/.*/\"&\",/'
    sed: can't read |: No such file or directory
    sed: can't read sed: No such file or directory
    sed: can't read s/.*/\": No such file or directory
    The system cannot find the path specified.

Split the two sed commands up.

Anyone have any ideas why this doesn't work?

MO



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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