# Functions: Naming a Job

A function keeps a few commands under one name, so a script says the job's name instead of repeating its lines: define it with name() { }, call it by its name like any command, and hand it arguments, which it reads as $1, $# and "$@".

![Cheat sheet for the lesson Functions: Naming a Job: A function keeps a few commands under one name, so a script says the job's name instead of repeating its lines: define it with name() { }, call it by its name like any command, and hand it arguments, which it reads as $1, $# and "$@".](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/45f9605a61fb436e9676f68bb1fa0a5e.webp)

- Category: Bash
- Level: Journeyman
- Tags: argument, linux, positional-parameter, shell-function, shell-script, unix
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/bash-functions-cheat-sheet
