Linux Terminal Glossary
›
Bash Scripting
function greet() { echo "Hello, $1"; }
Category:
Bash Scripting
function greet() { echo "Hello, $1"; }
Copy command
Define a reusable function
Defines a reusable function. $1 inside the function refers to the first argument passed to it.
Looking for more?
Search all 7,657 commands
— works offline, in English or Spanish, and fixes typos.