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 |