Add note: the $() was introduced in ksh 1989 and by 2011 all OS "sh" have support built-in

Jari Aalto
2025-02-03 11:17:00 +02:00
parent eba6aad24e
commit be05fd625b

@@ -22,6 +22,8 @@ Backtick command substitution `` `...` `` is legacy syntax with several issues.
`$(...)` command substitution has none of these problems, and is therefore strongly encouraged.
Note: The `$(...)` syntax was introduced in the 1989 Korn Shell (ksh). Finally, in 2011, Solaris 11 was the last operating system to switch from the Bourne Shell to the Korn Shell. After 2011, all typical shells have supported the POSIX `$(...)` notation.
### Exceptions
- Some legacy sh implementations (like Solaris) do not support `$(...)`, it is necessary to use backtick command substitution there. See [\[mc-devel\] \[PATCH\] Prefer $() to backticks in sh script](https://lists.midnight-commander.org/pipermail/mc-devel/2024-November/011241.html) and follow-ups.