Bash Tutorial

Bash Functions

Functions

Functions group reusable logic behind a name you can call anywhere.

greet() { echo "Hello, $1"; }
Try it Yourself
Run this BASH example in your local environment or course sandbox.