From aa2f21a2e914037ce75d2770c9174dabb4d55498 Mon Sep 17 00:00:00 2001 From: Raoul Scarazzini Date: Tue, 9 Dec 2025 16:35:57 +0100 Subject: [PATCH] [MB] Fixtures after last session This commit sums up all the fixtures needed after the last session. Fixes #63 Signed-off-by: Raoul Scarazzini --- Mastering-Bash/Bash-Exit-Status.md | 3 ++- Mastering-Bash/Bash-Expansions.md | 4 ++-- Mastering-Bash/Bash-Outputs.md | 10 ++++++---- Mastering-Bash/Bash-Signals-Kill.md | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Mastering-Bash/Bash-Exit-Status.md b/Mastering-Bash/Bash-Exit-Status.md index 5f49233..18bb438 100644 --- a/Mastering-Bash/Bash-Exit-Status.md +++ b/Mastering-Bash/Bash-Exit-Status.md @@ -79,5 +79,6 @@ In this lab you will: exit 0 fi - exit 1 + # Exit status 3 will be returned if no previous condition was met. + exit 3 ``` diff --git a/Mastering-Bash/Bash-Expansions.md b/Mastering-Bash/Bash-Expansions.md index 50a2533..c0f0e5c 100644 --- a/Mastering-Bash/Bash-Expansions.md +++ b/Mastering-Bash/Bash-Expansions.md @@ -34,11 +34,11 @@ In this lab you will: leave the default value for the second run: ```console - $ ./default_answer pizza + $ ./default_answer.sh pizza The answer to life, the universe and everything is pizza Name of the script is ./default_answer - $ ./default_answer + $ ./default_answer.sh The answer to life, the universe and everything is 42 Name of the script is ./default_answer ``` diff --git a/Mastering-Bash/Bash-Outputs.md b/Mastering-Bash/Bash-Outputs.md index dae4a30..0c1c30f 100644 --- a/Mastering-Bash/Bash-Outputs.md +++ b/Mastering-Bash/Bash-Outputs.md @@ -11,7 +11,7 @@ In this lab you will: 5. Append to the previously created file all the lines that contain a `:9` from `/etc/group` file. 6. Sort the content of `results.txt` by name. -7. Use the `less` pager to view the content of `/var/log/boot.log` and invoke an +7. Use the `less` pager to view the content of `/etc/vimrc` and invoke an editor to edit the file. ## Solution @@ -85,12 +85,14 @@ In this lab you will: unbound:x:994: ``` -7. Use the less pager to view the content of `/var/log/boot.log` and invoke an +7. Use the less pager to view the content of `/etc/vimrc` and invoke an editor to edit the file: ```console - $ less /var/log/boot.log + $ less /etc/vimrc (less interface opens) ``` - and then press `v`. + and then press `v`. You will see the `less` interface turning into a `vim` + one, but without the opportunity to make any change, since the file is not + owned by the `kirater` unprivileged user. diff --git a/Mastering-Bash/Bash-Signals-Kill.md b/Mastering-Bash/Bash-Signals-Kill.md index b7195c0..aac6564 100644 --- a/Mastering-Bash/Bash-Signals-Kill.md +++ b/Mastering-Bash/Bash-Signals-Kill.md @@ -18,7 +18,7 @@ In this lab you will: 1. Launch the sleep command and then press `CTLR+Z`. Result should be: ```console - [kirater@machine ~] $ sleep 100 + $ sleep 100 ^Z [1]+ Stopped sleep 100 ```