Files
developer-roadmap/roadmaps/shell-bash/content/function-scopes@lil5vo78g474F1yomar9y.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

9 lines
818 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Function Scopes
Function scope determines the visibility and accessibility of variables within a function. In shell scripting, variables can have either global or local scope. Global variables are accessible from anywhere in the script, including within functions, while local variables are only accessible within the function where they are defined. Understanding scope is crucial for avoiding naming conflicts and ensuring that functions operate predictably.
Visit the following resources to learn more:
- [@article@Bash Functions](https://linuxize.com/post/bash-functions/)
- [@article@Bash Functions – Declaration, Scope, Arguments, etc](https://www.webservertalk.com/bash-functions/)
- [@video@Crash-Course! Functions in Bash quickly explained and demystified!](https://www.youtube.com/watch?v=0tycTrpbWKs)