🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.user
Article #570

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

#570
From: Nicolas George
Date: Tue, 17 Nov 2026 07:50
15 lines
2926 bytes
Vincent Lefevre (HE12026-11-17):
> Contrary to the escape sequences in C, the purpose of backslash in a
> shell is to "preserve the literal value of the following character".
> Doing otherwise would be a source of confusion.

The backslash of C also servers the purpose of protecting " from ending
a string. The rest is bonus.

> Using single quotes is not possible in these cases.

Let us just say you need to read the documentation of the printf
command.

-- 
  Nicolas George
Technical Details
Message-ID: <O0m6Z-cpIx-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.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> <O06lz-cgMk-3@gated-at.bofh.it> <O0hgZ-cmZn-1@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.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: Tue, 17 Nov 2026 08:50:01 +0100
Message-ID: <O0m6Z-cpIx-1@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> <O06lz-cgMk-3@gated-at.bofh.it> <O0hgZ-cmZn-1@gated-at.bofh.it>
X-Mailbox-Line: From debian-user-request@lists.debian.org  Tue Nov 17 07:47:51 2026
Old-Return-Path: <george@phare.normalesup.org>
X-Amavis-Spam-Status: No, score=-9.149 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
 HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5,
 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: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 HELO_IP_IN_CL_SUBNET=-1.2 (check from: .normalesup. - helo: .nef.ens. - helo-domain: .ens.)  FROM/MX_MATCHES_HELO(DOMAIN)=-2; 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=ZQHGPsYP;
	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]); Tue, 17 Nov 2026 08:47:37 +0100 (CET)
X-Mailing-List: <debian-user@lists.debian.org> archive/latest/832960
List-ID: <debian-user.lists.debian.org>
List-URL: <https://lists.debian.org/debian-user/>
List-Archive: https://lists.debian.org/msgid-search/avwGmSblu-k6mfYn@phare.normalesup.org
Approved: robomod@news.nic.it
Lines: 15
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 17 Nov 2026 08:47:37 +0100
X-Original-Message-ID: <avwGmSblu-k6mfYn@phare.normalesup.org>
X-Original-References: <avr8-gKZTx-g27RE@wooledge.org>
 <avr6OuVs_c90AmCM@phare.normalesup.org>
 <20261116140728.GA803748@qaa.vinc17.org>
 <avsY_5TT0NYprhPQ@phare.normalesup.org>
 <20261117023317.GB803748@qaa.vinc17.org>