From c85eb6f3ef07c5b7534b5f1784255db0316865f8 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Sat, 16 Dec 2023 23:09:37 +0000 Subject: [PATCH] Make wording clearer The term "interpreter" was not used in that sentence, nor in that paragraph, so using "this" is confusing, IMO. --- src/content/chapters/3-how-to-run-a-program.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/chapters/3-how-to-run-a-program.mdx b/src/content/chapters/3-how-to-run-a-program.mdx index b66fda9..d79b5e5 100644 --- a/src/content/chapters/3-how-to-run-a-program.mdx +++ b/src/content/chapters/3-how-to-run-a-program.mdx @@ -280,7 +280,7 @@ So, why does the shell script run as a shell script? The kernel's format handler Well, it turns out that this behavior isn't part of the kernel. It's actually a common way for your *shell* to handle a failure case. -When you execute a file using a shell and the exec syscall fails, most shells will *retry executing the file as a shell script* by executing a shell with the filename as the first argument. Bash will typically use itself as this interpreter, while ZSH uses whatever `sh` is, usually [Bourne shell](https://en.wikipedia.org/wiki/Bourne_shell). +When you execute a file using a shell and the exec syscall fails, most shells will *retry executing the file as a shell script* by executing a shell with the filename as the first argument. Bash will typically use itself as the interpreter, while ZSH uses whatever `sh` is, usually [Bourne shell](https://en.wikipedia.org/wiki/Bourne_shell). This behavior is so common because it's specified in [*POSIX*](https://en.wikipedia.org/wiki/POSIX), an old standard designed to make code portable between Unix systems. While POSIX isn't strictly followed by most tools or operating systems, many of its conventions are still shared.