#scripting
74 solutions
The PowerShell true/false existence test every script should start with — supports files, folders, registry keys, and wildcards.
Chain three classic tools to greet every new shell with a colorful talking cow.
macOS's ipconfig prints a single address per interface — ideal for shell scripts and prompts.
Add a strict-mode header so scripts stop on unset variables and failing pipes.
Render any message inside an ASCII speech bubble with the classic cowsay utility.
The pair people forget: Set-Content overwrites, Add-Content appends — both create the file if it doesn't exist.
Measure and compare the runtime of shell commands with statistics.
Capture a full terminal session as a tiny, text-based .cast file.
Stop slicing strings with .Substring() — PowerShell has dedicated cmdlets to pull apart and reassemble file paths.
Use GNU find's -printf to print paths, sizes and timestamps in any layout, ready for sorting or scripts.
Without -Raw, Get-Content splits files into line arrays — a trap that breaks multi-line regex and exact string comparisons.
Execute scripts, install packages and bundle projects with one fast binary.