🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #181

Re: Control characters in the shell

#181
From: Moderator, John S. Quarterman
Date: Thu, 22 Mar 1990 23:35
36 lines
1842 bytes
From: Maarten Litmaath <uunet!cs.vu.nl!maart>

In article <589@longway.TIC.COM>,
	karl@IMA.IMA.ISC.COM (Karl Heuer) writes:
)...
)Proposal: Reserve $\ (dollar-backslash) as a new entity that begins a C-like
)escape, so we would have $\a $\b $\t $\n $\v $\f $\r, octal escapes like
)$\177, and hex escapes like $\x7F.
)
)Alternative proposal (from a suggestion by Eric Gisin, eric@mks.com): make a
)new string quoting mechanism, $"...", which is just like "..." except that, in
)addition to the four current backslash escapes \$ \` \" \\ that are permitted
)inside double quotes, all the C-like escapes \a etc. would be recognized.

Good idea!
But why not allow *both* syntaxes?  The first would be a simple form of
the second:

	$\a
equals
	$"\a"

...just like:

	$foo
and
	${foo}

When you only want a single control character, you'd use the first form,
when you want some escape codes in a row (possibly containing `normal'
characters as well), you'd use the second form.
--
 1) Will 4.5BSD have wait5()?         |Maarten Litmaath @ VU Amsterdam:
 2) Sleep(3) should be sleep(2) again.|maart@cs.vu.nl, uunet!mcsun!botter!maart

Volume-Number: Volume 19, Number 23
Technical Details
Message-ID: <592@longway.TIC.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!longway!std-unix
References: <2567@mbf.UUCP> <EQ.1811xds13@ficc.uu.net> <16108@haddock.ima.isc.com> <1990Mar8.171918.16011@mks.com> <16184@haddock.ima.isc.com> <589@longway.TIC.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!longway!std-unix
From: std-unix@longway.TIC.COM (Moderator, John S. Quarterman)
Newsgroups: comp.std.unix
Subject: Re: Control characters in the shell
Message-ID: <592@longway.TIC.COM>
Date: 22 Mar 90 23:35:10 GMT
References: <2567@mbf.UUCP> <EQ.1811xds13@ficc.uu.net> <16108@haddock.ima.isc.com> <1990Mar8.171918.16011@mks.com> <16184@haddock.ima.isc.com> <589@longway.TIC.COM>
Reply-To: Maarten Litmaath <uunet!cs.vu.nl!maart>
Organization: VU Informatika, Amsterdam, the Netherlands
Lines: 36
Approved: jsq@longway.tic.com (Moderator, John S. Quarterman)