Introduction
Functions let you group commands together to reuse them easily and keep your script organized.
When you want to run the same set of commands multiple times without rewriting them.
When you want to break a big script into smaller, easy-to-understand parts.
When you want to make your script cleaner and easier to maintain.
When you want to pass information to a group of commands and get results back.