FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Convert a string to lowercase
Normalize a text value using Bash expansion.
lowercase✓ Tested
Remove a filename extension
Keep the path while removing its final extension.
filename✓ Tested
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