🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.user
Article #540

Re: beeps and other sounds

#540
From: Nicolas George
Date: Mon, 16 Nov 2026 11:50
24 lines
3065 bytes
Vincent Lefevre (HE12026-11-16):
> >    - printf "\a": The printf command works similarly to echo -e "\a".
> AFAIK, this one is portable.

The escaping if fragile, it relies on the fact that a is not a special
character for escaping and therefore the backslash in front of it will
not have its special semantic.

For a more robust escaping, prefer:

printf "\\a" → the backslash is properly escaped.

printf '\a' → no escaping needed in single quotes.

printf $'\a' → less portable, the shell does the \a→BEL translation, not
the printf command.

printf  → type it with ctrl-V for example, no escaping needed.

Regards,

-- 
  Nicolas George
Technical Details
Message-ID: <O03nH-cf7Q-7@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!news.furie.org.uk!piper.furie.org.uk!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <Jz190-2w6T-7@gated-at.bofh.it> <Jz74J-2ClB-3@gated-at.bofh.it> <O03e1-cf3m-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!news.furie.org.uk!piper.furie.org.uk!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Nicolas George <george@nsup.org>
Newsgroups: linux.debian.user
Subject: Re: beeps and other sounds
Date: Mon, 16 Nov 2026 12:50:01 +0100
Message-ID: <O03nH-cf7Q-7@gated-at.bofh.it>
References: <Jz190-2w6T-7@gated-at.bofh.it> <Jz74J-2ClB-3@gated-at.bofh.it> <O03e1-cf3m-3@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 11:45:10 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=hhRKWaXc;
	dkim-adsp=pass; dkim-atps=neutral
Reply-To: debian-user@lists.debian.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Mon, 16 Nov 2026 12:44:56 +0100 (CET)
X-Mailing-List: <debian-user@lists.debian.org> archive/latest/832926
List-ID: <debian-user.lists.debian.org>
List-URL: <https://lists.debian.org/debian-user/>
List-Archive: https://lists.debian.org/msgid-search/avrstzwgDRtEhgBH@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 12:44:55 +0100
X-Original-Message-ID: <avrstzwgDRtEhgBH@phare.normalesup.org>
X-Original-References: <BYAPR12MB28083B81ACF7B2E5EB5E2368BA402@BYAPR12MB2808.namprd12.prod.outlook.com>
 <CAO6YxPzgFFzwO5dHGwewxiXRwBgM1=JM_fLZ0MFAr-saowao=Q@mail.gmail.com>
 <20261116113803.GF670644@qaa.vinc17.org>