From 0982446c7a65622a622a519e79751066c9954fe2 Mon Sep 17 00:00:00 2001 From: zleyyij Date: Thu, 30 May 2024 18:37:47 -0600 Subject: [PATCH] vault backup: 2024-05-30 18:37:47 --- IT/Scripting.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/IT/Scripting.md b/IT/Scripting.md index dcdf949..9380f1c 100644 --- a/IT/Scripting.md +++ b/IT/Scripting.md @@ -128,8 +128,14 @@ function_name () { ``` To return a value from a function, use the `return` keyword. After calling, it'll be assigned to the global variable `$?`. +```bash +my_function () { + return 55 +} -``` +my_function +# Will echo 55 +echo $? ``` ## Commands | Command | Description |