delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=2.5 required=5.0 tests=BAYES_50,RDNS_DYNAMIC,TVD_RCVD_IP |
X-Spam-Check-By: | sourceware.org |
From: | "Fabrice Niessen" <fni AT missioncriticalit DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Single quotes inside here document |
X-Archive: | encrypt |
Date: | Tue, 18 Jan 2011 08:36:59 +0100 |
Message-ID: | <807he2fysk.fsf@missioncriticalit.com> |
User-Agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
MIME-Version: | 1.0 |
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 |
Hello, I try to run the following script on the latest Cygwin (updated yesterday) on Windows XP SP3: --8<---------------cut here---------------start------------->8--- data=$(cat <<'EOF' Date valeur;Reference de l'operation;Description;Montant de l'operation;Devise;Date d'operation;Compte de contrepartie;Nom de la contrepartie :;Communication 1 :;Communication 2 : 04-06-2009;A9F04NT01WK300TG;Virem. internet;420,00;EUR;04-06-2009;799-5900947-23;PAYEE ONE; ; 24-02-2009;A9B24NT012K4018Z;Virem. internet;-54,93;EUR;24-02-2009;799-9974005-30;ME;Eigen rekening; 18-05-2008;A8E19NT000S604QI;Virem. internet;-1.000,00;EUR;19-05-2008;799-8068445-18;PAYEE TWO; ; EOF ) echo "$data" --8<---------------cut here---------------end--------------->8--- Note -- Of course, the goal is not to simply echo the data, but to process it through pipes, such as: echo "$data" | grep "PAYEE ONE". but it fails with the following error: --8<---------------cut here---------------start------------->8--- sh: line 2: unexpected EOF while looking for matching `'' sh: line 10: syntax error: unexpected end of file --8<---------------cut here---------------end--------------->8--- This is due to the apostrophe in the French labels (of the header line of this Excel CSV file) -- but people report me that exact same script works under Linux... Any idea on how to: - circumvent this problem? - or, eventually, do this better? Best regards, Fabrice Niessen -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |