From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?S=C3=A9bastien_Vauban?= Subject: Re: [babel] Sh problem when echo'ing input data with ' inside Date: Tue, 18 Jan 2011 10:22:05 +0100 Message-ID: <80d3nuefcy.fsf@missioncriticalit.com> References: <80k4i3vgzo.fsf@missioncriticalit.com> <87k4i3uwpm.fsf@Rainer.invalid> <87fwsrusac.fsf@Rainer.invalid> <80vd1n40k0.fsf@missioncriticalit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Eric and Achim, S=C3=A9bastien Vauban wrote: > Achim Gratz wrote: >> The script produced by babel should actually look like this: >> >> #+begin_src sh >> data=3D$(cat <<'BABEL_STRING' >> Num.ro du compte :;979-9500975-24;Compte Maxi >> Date valeur;R.f.rence de l'op.ration;Description;Montant de l'op.ration;= Devise;Date d'op.ration;Compte de contrepartie;Nom de la contrepartie :;Com= munication 1 :;Communication 2 : >> 04-06-2009;A9F04NT01WK300TG;Virem. internet;420,00;EUR;04-06-2009;799-59= 00947-23;PAYEE ONE; ;=20 >> 24-02-2009;A9B24NT012K4018Z;Virem. internet;-54,93;EUR;24-02-2009;799-99= 74005-30;ME;Eigen rekening;=20 >> 18-05-2008;A8E19NT000S604QI;Virem. internet;-1.000,00;EUR;19-05-2008;799= -8068445-18;PAYEE TWO; ; >> BABEL_STRING >> ) >> echo "$data" >> #+end_src >> >> That is no indentation and the here-tag should be in quotes (otherwise t= he >> here-script is subject to shell expansion). > > The above, from which I even removed the accentuated characters (from Fre= nch), > still does not work... > > Now, I can imagine it is due to Cygwin, not to Emacs/Org/Babel. Though, t= hat's > a problem in general for the use of sh blocks from Org... under Windows, = then. > > - Has anyone any experience with this? > - Can some Bash user confirm what I see? > - Can some Windows user confirm this with other Unix-emulation shells (Mi= nGW > and the like)? I asked the question on the Cygwin mailing list, and got an answer from Tob= ias Schlottke, telling me to use the 'plain old' syntax (=3D`...`=3D instead of =3D$(...)=3D): #+begin_src sh data=3D`cat <