Results for “Dates & process utilities”
Small, practical examples. Search by task or narrow things down below.
Rename a practice file
Linux Commands: Rename a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Reorder fields with a capture group
Linux Commands: Use extended regular expressions and backreferences to rearrange a known format.
Linux Commands✓ Tested
Replace text in a pipeline
Linux Commands: Replace text in a pipeline using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Replace text in a string
Replace every occurrence of a substring and keep the result in a new string. The original string is unchanged.
string✓ Tested
Replace text with sed
Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.
sed✓ Tested
Replay an unpublished branch on a newer base
Git: Rebase updates the base of local feature commits when their changes do not conflict.
Git✓ Tested
Restore an environment value after temporary use
PowerShell: Use finally so temporary process configuration does not leak to subsequent work; remove the entry when it was originally absent.
PowerShell✓ Tested
Restrict a function parameter to known choices
PowerShell: ValidateSet rejects unsupported values before the function body executes.
PowerShell✓ Tested
Return typed data from an async function
Await a Promise and handle failures explicitly.
async✓ Tested
Round a timestamp down to its month
Group dates by a calendar boundary.
date_trunc✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ Tested