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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=wSU+x42keeP4TydP QZQZ/Z5IbBQ6qABq4nmY1ic4S15rlu1yVQKKgEnM9CNWWMMzPTf5M1BRFuX4qMec rmde3kOdyFtW7Mtyl+4x1ZeZ2OCDoJLlOjzDKLC3CVpSIcV8xXywr5uAqp8vAXzd xWV+o9a52Q85pMR3oSCvlB1uRkE= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=ZXqCSXemMGoLafGtw0hUEK pMc4I=; b=ViE8l22NZ9TTuXsqDlAYivNBvLwrYf4IeuwwGphh3xMUPcwGsEIgHr TN9jruN+wY/n8SredfeDjhhjd3IVxw3bp5FDuEFFZTDAVpAJ/h2fj5dEVCmo3FQS EC934oceZvxyLn/GfV0IAfK2oUCSzrBBMYHYMGyYSoA/dl1OiTfrI= 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=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*edu, HContent-Transfer-Encoding:8bit X-HELO: mailsrv.cs.umass.edu Reply-To: moss AT cs DOT umass DOT edu Subject: Re: gnanny: tr: warning: an unescaped backslash at end of string is not portable To: cygwin AT cygwin DOT com References: <5C29F63E DOT 9010606 AT tlinx DOT org> From: Eliot Moss <moss AT cs DOT umass DOT edu> Message-ID: <eeab5b48-e8a0-6d6c-303e-835edd36ac5b@cs.umass.edu> Date: Mon, 31 Dec 2018 07:57:58 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <5C29F63E.9010606@tlinx.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 12/31/2018 5:58 AM, L A Walsh wrote: > 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? It is referring to your input '\' and would prefer '\\'. Best - Eliot Moss -- 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