Hi Denys, At 2023-07-31T13:38:00+0200, Denys Vlasenko wrote: > On 7/28/23 19:51, Martin D Kealey wrote: > > On the other hand, since everyone has now had 36+ years to update > > their scripts to get rid of backticks, > > I don't know about others, but I missed the memo that `` is > deprecated.
The definitive "takedown" of `` is in Tom Duff's memo describing his "rc" shell, which dates back to 1988-1991 or thereabouts. (I wish I could put a more precise date on it.)[1] I'm attaching a copy for your edification. Any use of a Bourne-derived shell should read it and consider its points. > The "function" keyword, for example. Why does it even exists? It adds > no functionality. When you use it, the only effect you get is that now > your script requires bash to work properly. > > (searching the net... looks like it's historic, added for > compatibility with ksh). Yes. It'd be a better world if both `` quoting _and_ the "function" keyword were retired. Regards, Branden [1] It's possible Steve Bourne knew better but was pressured into implementing the lexically simpler `` approach to command substitution instead of recursively calling the parser (as Chet pointed out) because it would be more performant. John Mashey, the author of the predecessor Unix shell (and successor to Ken Thompson's original Unix shell) has gone on record as "goading" Bourne into doing questionable things in the quest for speed. https://www.in-ulm.de/~mascheck/bourne/segv.html
rc_A Shell for Plan 9 and Unix Systems_Duff.pdf
Description: rc_shell_tom_duff.pdf
signature.asc
Description: PGP signature