FIND YOUR NEXT FEW LINES

Results for “Parameter expansion”

Small, practical examples. Search by task or narrow things down below.

58 snippets foundClear filters
Linux CommandsGetting Started

Prevent expansion with single quotes

Linux Commands: Prevent expansion with single quotes using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
JavaScriptFiles & async

Read a URL query parameter

Parse a URL with the standard JavaScript URL API.

JavaScript✓ Tested
GoHTTP & URLs

Read an HTTP query parameter

Read an HTTP query parameter using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsGetting Started

Read positional parameters in a function

Bash Scripts: Read positional parameters in a function with a small standalone Bash program.

Bash Scripts✓ Tested
PowerShellFunctions & parameter validation

Restrict a function parameter to known choices

PowerShell: ValidateSet rejects unsupported values before the function body executes.

PowerShell✓ Tested
jQueryHTTP requests

Send query parameters as an object

jQuery: jQuery encodes the data object into the request query.

jQuery✓ Tested
PowerShellFunctions & parameter validation

Accept one typed value at a time from a pipeline

PowerShell: An advanced function uses process to handle each pipeline item.

PowerShell✓ Tested
PowerShellFunctions & parameter validation

Accumulate pipeline input across begin process and end

PowerShell: Keep initialization and final output separate from per-item work.

PowerShell✓ Tested
PowerShellFunctions & parameter validation

Dispatch values with wildcard patterns

PowerShell: Switch -Wildcard interprets shell-style matching patterns for each clause.

PowerShell✓ Tested
PowerShellFunctions & parameter validation

Enforce a numeric range at a function boundary

PowerShell: ValidateRange performs argument validation before work begins.

PowerShell✓ Tested
CStructures & function interfaces

Keep caller data unchanged by passing a structure by value

C: A value parameter is a copy of the original structure.

C✓ Tested
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested