[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : Re: new module 'system-quote'

From: Bastien ROUCARIES
Subject: RE : Re: new module 'system-quote'
Date: Thu, 10 May 2012 13:02:04 +0200

echo line1^


Work also and could be simple


echo line1^

Will work with \r a not escaped carriage return

Le 10 mai 2012 00:07, "Bruno Haible" <address@hidden> a écrit :

Bastien ROUCARIES wrote:
> Something like this will work
> http://stackoverflow.com/a/269819

Indeed! It allows to substitute newlines.

$ export NL='
$ cmd.exe /c 'printf "%s\n" foo^%NL%%NL%bar' | od -t x1
0000000 66 6f 6f 0a 62 61 72 0a

But I don't succeed in getting a carriage-return character in the same way:

$ eval `echo "export CR='_'" | tr '_' '\r'`
$ cmd.exe /c 'printf "%s\n" foo^%CR%%CR%bar' | od -t x1
0000000 66 6f 6f 62 61 72 0a

Any idea how to get this one?

And then there is also the problem with byte sequences that are not
strings in the current locale encoding...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]