🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.user
Article #548

Re: escaping with \ in shells (was: beeps and other sounds)

#548
From: Nicolas George
Date: Mon, 16 Nov 2026 15:00
24 lines
2993 bytes
Vincent Lefevre (HE12026-11-16):
> I would have said that backslash + ASCII letter ([A-Za-z]) inside
> double quotes is safe (probably with digits too) as used in many
> scripts, and such characters are obviously not characters that need
> escaping.

Why would it be OBVIOUS that the shell do not use the same escaping
sequences as printf or the C language?

Also: are you sure of your statement, to the point of risking your
health on it? If not, be safe.

> And Debian (for instance) keeps distributing such scripts.

Debian does what it does, that has no relevance on advice given to
people who want to program robustly.

> There are cases when one wants to be able to do expansion, knowing
> that this is safe. For instance:

Yes, but what is your point?

-- 
  Nicolas George
Technical Details
Message-ID: <O06lz-cgMk-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <O04tr-cfJv-27@gated-at.bofh.it> <O04jL-cfFg-3@gated-at.bofh.it> <O05zb-cgt7-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Nicolas George <george@nsup.org>
Newsgroups: linux.debian.user
Subject: Re: escaping with \ in shells (was: beeps and other sounds)
Date: Mon, 16 Nov 2026 16:00:01 +0100
Message-ID: <O06lz-cgMk-3@gated-at.bofh.it>
References: <O04tr-cfJv-27@gated-at.bofh.it> <O04jL-cfFg-3@gated-at.bofh.it> <O05zb-cgt7-1@gated-at.bofh.it>
X-Original-To: debian-user@lists.debian.org
X-Mailbox-Line: From debian-user-request@lists.debian.org  Mon Nov 16 14:54:05 2026
Old-Return-Path: <george@phare.normalesup.org>
X-Amavis-Spam-Status: No, score=-4.049 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001]
 autolearn=ham autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.7
X-Ens-Nef-Client: 129.199.129.80 ( name = phare.normalesup.org )
Authentication-Results: nef.ens.fr; dkim=pass
	reason="2048-bit key; unprotected key"
	header.d=nsup.org header.i=@nsup.org header.b=ADCd8M9T;
	dkim-adsp=pass; dkim-atps=neutral
Reply-To: debian-user@lists.debian.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Mon, 16 Nov 2026 15:53:51 +0100 (CET)
X-Mailing-List: <debian-user@lists.debian.org> archive/latest/832935
List-ID: <debian-user.lists.debian.org>
List-URL: <https://lists.debian.org/debian-user/>
List-Archive: https://lists.debian.org/msgid-search/avsY_5TT0NYprhPQ@phare.normalesup.org
Approved: robomod@news.nic.it
Lines: 24
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 16 Nov 2026 15:53:51 +0100
X-Original-Message-ID: <avsY_5TT0NYprhPQ@phare.normalesup.org>
X-Original-References: <avr8-gKZTx-g27RE@wooledge.org>
 <avr6OuVs_c90AmCM@phare.normalesup.org>
 <20261116140728.GA803748@qaa.vinc17.org>