Keyboard problem

Ian Bruntlett ian.bruntlett at gmail.com
Mon Nov 10 11:05:06 UTC 2025


Hi Jay,

On Sun, 9 Nov 2025 at 23:47, Jay Ridgley <jridgley2 at austin.rr.com> wrote:

> the correct hexcode (U+0027). This key is used heavily in scripting as
> part of Linux.
>

As well as `command`you can now do $(command) which is now preferred for
various technical reasons.

Googling for "is $() preferred" yields some interesting results:-










*In Shell ScriptingThe $(...) syntax is the modern, recommended approach
for the following reasons:    Readability: It is more visually distinct
from single quotes ('...'), making the code easier to read and maintain.
Nesting: It can be nested easily without requiring complicated backslash
escaping, unlike backticks.        Example with $(...): echo $(echo hello
$(echo word)) outputs hello word.        Example with backticks: echo echo
hello \echo word\\`` is far less clear.    Consistency: It behaves more
consistently with how other expansions (like variable expansion $variable)
are parsed.    Portability: While both are technically in the POSIX
standard, $(...) is generally more consistently supported across different
modern shells and is recommended for all new development. *

HTH,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://github.com/ian-bruntlett/TECH-Manuals/blob/main/tm-free-software.md
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20251110/5a30bee3/attachment.html>


More information about the ubuntu-users mailing list