Results for “Linux Commands”
Small, practical examples. Search by task or narrow things down below.
Read output from a completed container
Retrieve the stdout captured by Docker.
logs✓ Tested
Read rows from CSV text
Parse CSV into objects with named properties.
CSV✓ Tested
Read the last array element
PowerShell: A negative array index counts backward from the end.
PowerShell✓ Tested
Reject NaN and infinite values
PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.
PowerShell✓ Tested
Remove an optional hashtable entry
PowerShell: Remove changes the map in place without changing unrelated entries.
PowerShell✓ Tested
Rename a file in its current directory
PowerShell: Rename-Item changes the name without moving the item to another directory.
PowerShell✓ Tested
Repeat while a condition holds
PowerShell: Repeat while a condition holds using PowerShell 7.
PowerShell✓ Tested
Replace a literal word in text
PowerShell: Replace a literal word in text using PowerShell 7.
PowerShell✓ Tested
Replace repeated whitespace
Normalize runs of whitespace to one space.
regex✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested
Return a collection as one pipeline object
PowerShell: The unary comma prevents the returned array from being enumerated at this boundary.
PowerShell✓ Tested
Reverse a copy while preserving the source
PowerShell: Clone the array before using Array.Reverse because Reverse mutates its argument.
PowerShell✓ Tested