Results for “current path”
Small, practical examples. Search by task or narrow things down below.
Serialize a hashtable as JSON
Produce compact JSON for a small data object.
JSON✓ Tested
Serialize nested objects with an explicit depth
PowerShell: Select a sufficient depth so nested data is retained instead of converted into a descriptive string.
PowerShell✓ Tested
Set a working directory
Choose the default directory for later instructions and the running process.
Dockerfile✓ Tested
Set an environment value for one child command
Bash Scripts: A command-prefix assignment is visible to that command without overwriting the shell’s current variable.
Bash Scripts✓ Tested
Sort a sequence of numbers
PowerShell: Sort a sequence of numbers using PowerShell 7.
PowerShell✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Split an array into fixed-size batches
PowerShell: Bound the final index so the last batch can contain fewer elements.
PowerShell✓ Tested
Split simple delimited text
PowerShell: Split simple delimited text using PowerShell 7.
PowerShell✓ Tested
Split text on a simple delimiter
PowerShell: The split operator uses a regular expression; this delimiter has no special regex meaning.
PowerShell✓ Tested
Stage one file
Add one changed file to the next commit.
add✓ Tested
Start a command with a minimal environment
Linux Commands: Use env -i with an explicit PATH for a controlled child environment.
Linux Commands✓ Tested
Stop a search loop at the first match
Bash Scripts: Break exits the current loop as soon as the desired item is found.
Bash Scripts✓ Tested