Deutsch   English   Français   Italiano  
<1002o0k$2l2at$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Re: How to convert <binaryGlowMixedWithASCII> to pure ASCII
Date: Wed, 14 May 2025 20:39:14 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <1002o0k$2l2at$1@dont-email.me>
References: <vv8asa$2nscb$1@news.xmission.com>
 <slrn1023i84.2s2es.cmartin+usenetYYMMDD@nyx2.nyx.net>
 <vvsp2r$33sch$1@news.xmission.com> <vvssf0$13ls6$1@dont-email.me>
 <vvsv3k$33vk8$1@news.xmission.com> <vvt29j$15ao1$1@dont-email.me>
 <1001d6e$2b3hj$1@dont-email.me> <1001q3f$2ejpc$2@dont-email.me>
 <20250514075025.179@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 14 May 2025 20:39:16 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="da4e06edbb29426f00597176089fc285";
	logging-data="2787677"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19MhjeC3nQDW6aGPbd3i4ig"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:Lt9gbIOPb/H2sS60iDm2Uptq4wg=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <20250514075025.179@kylheku.com>

On 14.05.2025 17:02, Kaz Kylheku wrote:
> On 2025-05-14, Chris Elvidge <chris@internal.net> wrote:
>> On 14/05/2025 at 07:28, Brian Patrie wrote:
>>> Chris Elvidge wrote:
>>>  > $ sq=$(echo -ne '\u0027\u2018\u2019\u0022\u201c\u201d')
>>>
>>> To eliminate needless overhead:
>>>    sg=$'\u0027\u2018\u2019\u0022\u201c\u201d'
> 
> So it is needless overhead in a script that is intended
> to be portable to certain shells.
> The -n option of echo is documented in POSIX (as an XSI extension),

The 'echo -n' could also simply be replaced by 'printf'.

> whereas $'...' is a feature of some shells. (Korn, Bash, Zsh?)

Concerning portability the question in the first place is IMO what to
do with those '\u....' . - I don't think this is standard, or is it?

So if it's non-standard we could use arbitrary common but non-standard
shell features.

Like the shell built-in 'printf' without $'...' to use just '...'.
Or IMO best just the already suggested ANSI strings  var=$'...' .

Janis

> [...]