delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/14/12:20:58

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:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=l8ivNi5jqAdKEc0qhpxxeP+Am2BPy
4aZnk+lV6HHsZSh51bSQc+E1X6B0xNtgAM6gXFlQCbl93xL7t8Mv4WfXHlE9fJqi
T1H2Hg2S0xgbV+OwZYY9dMFMMBdNU/MHwQvxM2kuipmrjInkH2Y3HcsJR+aCans4
0NNQVKNo/QlxgQ=
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:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=oTVANE4tH00aoo/iIrGsYFckl70=; b=hai
S0mroKS250KrhvKmkQJ/j+PRseyBLBUeRG+Y2Vq/pdk92u0sxBT2W6lUaiL/vzDa
Zifn4bbybx4MTBF/vTEDR65ljCHsW9JE8QgZaE4t9GP5RmhVfc6GctDXGM0abFHG
udHwEAUxyypZjJy2SsoQuEsg6QVDV3G1zyodrKl8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-la0-f51.google.com
MIME-Version: 1.0
X-Received: by 10.152.6.41 with SMTP id x9mr2784600lax.95.1415985635028; Fri, 14 Nov 2014 09:20:35 -0800 (PST)
Date: Fri, 14 Nov 2014 12:20:34 -0500
Message-ID: <CABa6CE=OFjPjomA9xQESG==MTjP9y=5UqeTgtg4fxnZjYqTEuw@mail.gmail.com>
Subject: sed anomaly in bash script
From: cyg Simple <cygsimple AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

$ TEST=`echo 'c:\windows' | sed -e s.\\.\\\\.g`
$ echo $TEST
c:\\windows

<file name=sed.sh>
TEST=`echo 'c:\windows' | sed -e s.\\\.\\\\\.g'
echo $TEST
</file>

$ bash -x sed.sh
++ echo 'c:\windows'
++ sed -e 's.\.\g'
sed -e expression #1, char 7: unterminated 's' command
+ TEST=
+ echo

CYGWIN_NT-6.1 HOSTNAME 1.7.32(0.274/5/3) 2014-08-13 23:06 x86_64 Cygwin

Does anyone have a suggestion on turning c:\windows into c:\\windows?

Thanks,
-- 
cyg Simple

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

- Raw text -


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