delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/31/05:58:22

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:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=gI2
BN+fNhgJ7uRi+QfcrAQY87hWTm1m6Ki8FaAZh1MNn4pUeei7QOkHYMbqnV7Qr3IF
hoXrPufg+1LEJt/Sj1h1q7qtnspRd6IHdhhaj4jq4ePcI7PM3tyY6UKW6eFSRBbq
npZ7RIPX73nKFFy4xmjgrFGsWy5l+KQbWRIoEY/w=
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:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=l+2O0nXa3
DEEawJ21szv/FMq4MI=; b=axyp/8wfGGVXp6Hsq1Zb5BEzW7QFsdaA6Rk96JOTw
cngnIkdHm0Ucg2T8l2S9Xp169v1TVROghgDQuwqvNfYc+nwHRpusnFXNnYmkaWf2
DnliwIK0JRGUr+M9SzF35iqmfAcNYPr2FyZXhlS7+qMnRQSACkJY2bExtFgkudA+
dc=
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-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=ham version=3.3.2 spammy=dc, H*r:8.14.4, quotes
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <5C29F63E.9010606@tlinx.org>
Date: Mon, 31 Dec 2018 02:58:06 -0800
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: gnanny: tr: warning: an unescaped backslash at end of string is not portable
X-IsSubscribed: yes

This is being run on cygwin w/bash, version 4.4.12(3)-release.


Have a table of windows files, sample line (it's all 1 line):
>  cat test
D,"c:\windows\system32\FMS.DLL",2010-11-20 19:24:33,2010-11-20 
03:59:27,93696,A,0x00024E23,0x00024E23,x86,GUI,"CV",0x04480000,Unknown,0x00019000,Not 
Loaded,1.1.6000.16384,1.1.6000.16384,6.1,9.0,6.1,6.1

I run 'tr' to switch around the backslashes to slashes:

>  tr '\' '/' <test
tr: warning: an unescaped backslash at end of string is not portable
D,"c:/windows/system32/FMS.DLL",2010-11-20 19:24:33,2010-11-20 
03:59:27,93696,A,0x00024E23,0x00024E23,x86,GUI,"CV",0x04480000,Unknown,0x00019000,Not 
Loaded,1.1.6000.16384,1.1.6000.16384,6.1,9.0,6.1,6.1


1) First question: what unescaped backslash?  The '\n is escaped via the 
surrounding quotes.

2) how should one escape it?

Is this a bug?



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