FIND YOUR NEXT FEW LINES
Results for “variables”
Small, practical examples. Search by task or narrow things down below.
16 snippets foundClear filters
Replace every occurrence in a string
Substitute text directly with Bash parameter expansion.
replace✓ Tested
Split a line into named fields
Read a simple delimiter-separated line into variables.
read✓ Tested
Use a default value for an unset variable
Supply a fallback without changing the original variable.
parameter expansion✓ Tested
Use a recursive function for a bounded calculation
Bash Scripts: A recursive factorial demonstrates local variables and a clear base case.
Bash Scripts✓ Tested