Results for “parameter expansion”
Small, practical examples. Search by task or narrow things down below.
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Pass behavior as a function delegate
C#: Func describes a callable with typed parameters and a return value.
C#✓ Tested
Pass dollar expressions through Compose
Docker / Compose: Double dollar signs defer expansion to the container shell.
Docker / Compose✓ Tested
Percent-encode one URL component
JavaScript: encodeURIComponent escapes a parameter value rather than a complete URL.
JavaScript✓ Tested
Percent-encode one URL component
TypeScript: encodeURIComponent escapes a parameter value rather than a complete URL.
TypeScript✓ Tested
Prepend items while preserving existing array values
Bash Scripts: Construct a new array with the new values before the quoted original expansion.
Bash Scripts✓ Tested
Provide a default environment value
Set a runtime default that can be overridden at startup.
Dockerfile✓ Tested
Read an optional associative-array entry
Bash Scripts: Use a fallback expansion when a map key may not be present under nounset.
Bash Scripts✓ Tested
Select a range of array elements
Bash Scripts: Quote a sliced at-sign expansion to keep each selected element separate.
Bash Scripts✓ Tested
Set service environment values
Pass configuration through the Compose environment section.
Compose✓ Tested