delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/12/05/14:39:50

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:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=oXl
DS8FsCNXdZXC5FL1RRu1vnxKUx/Ki70VPraYYAy6zOBvS/F5g763kwUdbOURYGhM
AsKztC4aPvIlAdJUCdbsHgAkqUXroCzVNLSFezHLpPz3FClnwwG+0DV/Oto2PY41
oxShkL8kMNQfYLEb/ojffduKLycIpQgM4Xe4KRx0=
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:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=KXtVi3PjT
nTcki5lgRBOtIiMqTc=; b=ldQS6LsnAvTojKl4wXCeplMTGg9DSjt3BpHtf++Pt
H9+j3verwlN9xzrEhoy7L6eghWMFZ09b+0ylmHOvvZLT9UGzjkaVn2iNLbZVAPZt
dG/NZOPkx9IzHJobUWc74T5TtYpd5x2Qt+YMrqrL5Xdv9bupzeOKe59+mzrrvvD4
PQ=
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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:0500, H*M:corp
X-HELO: esa4.dell-outbound.iphmx.com
From: "Gluszczak, Glenn" <Glenn DOT Gluszczak AT dell DOT com>
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com uB5JdGE9019145
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd51.lss.emc.com uB5JdGE9019145
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: sh -c and newline
Date: Mon, 5 Dec 2016 19:38:59 +0000
Message-ID: <91DCAC3CB99C724EB365BB64677FBE7B1007BC@MX204CL04.corp.emc.com>
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd53.lss.emc.com
X-RSA-Classifications: public
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id uB5JdmCI025510

I can't seem to get sh -c to recognize newline.  Tcsh -c works.
I'm using echo as an example but I'm actually trying to build a here-document.

%%%sh -c  "echo \nhello"
nhello

%%%sh -c  "echo \\nhello"
nhello

%%%sh -c  "echo \\\nhello"
\nhello

%%%tcsh -c  "echo \nhello"
nhello

%%%tcsh -c  "echo \\nhello"
\nhello

%%%tcsh -c "echo \\\nhello"

hello




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