From be05fd625b93669e1fded05c609ee2e0b567d0f1 Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Mon, 3 Feb 2025 11:17:00 +0200 Subject: [PATCH] Add note: the $() was introduced in ksh 1989 and by 2011 all OS "sh" have support built-in --- SC2006.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SC2006.md b/SC2006.md index 450b866..4c6f0d3 100644 --- a/SC2006.md +++ b/SC2006.md @@ -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.