Results for “parameter expansion”
Small, practical examples. Search by task or narrow things down below.
Prevent expansion with single quotes
Linux Commands: Prevent expansion with single quotes using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Read a URL query parameter
Parse a URL with the standard JavaScript URL API.
JavaScript✓ Tested
Read an HTTP query parameter
Read an HTTP query parameter using a complete Go program with explicit sample inputs.
Go✓ Tested
Read positional parameters in a function
Bash Scripts: Read positional parameters in a function with a small standalone Bash program.
Bash Scripts✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested
Send query parameters as an object
jQuery: jQuery encodes the data object into the request query.
jQuery✓ Tested
Accept one typed value at a time from a pipeline
PowerShell: An advanced function uses process to handle each pipeline item.
PowerShell✓ Tested
Accumulate pipeline input across begin process and end
PowerShell: Keep initialization and final output separate from per-item work.
PowerShell✓ Tested
Dispatch values with wildcard patterns
PowerShell: Switch -Wildcard interprets shell-style matching patterns for each clause.
PowerShell✓ Tested
Enforce a numeric range at a function boundary
PowerShell: ValidateRange performs argument validation before work begins.
PowerShell✓ Tested
Keep caller data unchanged by passing a structure by value
C: A value parameter is a copy of the original structure.
C✓ Tested
Keep exec-form arguments literal
Docker / Compose: JSON exec form does not expand shell environment variables.
Docker / Compose✓ Tested