#scripting

74 solutions

Check if a file or folder exists with Test-Path
WindowsFilesscriptingpowershell

The PowerShell true/false existence test every script should start with — supports files, folders, registry keys, and wildcards.

Low risk ✓ 2026-09-17
Random Rainbow Cow Greeting: fortune + cowsay + lolcat
macOSTerminalscriptingASCII art

Chain three classic tools to greet every new shell with a colorful talking cow.

Low risk ✓ 2026-09-20
Get the Local IP of an Interface with ipconfig getifaddr
macOSscriptingipipconfig

macOS's ipconfig prints a single address per interface — ideal for shell scripts and prompts.

Low risk ✓ 2026-09-17
Fail Fast in Bash With set -euo pipefail
macOSbashshellscripting

Add a strict-mode header so scripts stop on unset variables and failing pipes.

Low risk ✓ 2026-10-13
Talk With a Cow in the Terminal Using cowsay
macOSTerminalscriptingASCII art

Render any message inside an ASCII speech bubble with the classic cowsay utility.

Low risk ✓ 2026-09-20
Write and append to files with Set-Content and Add-Content
WindowsFilesscriptingpowershell

The pair people forget: Set-Content overwrites, Add-Content appends — both create the file if it doesn't exist.

Low risk ✓ 2026-09-17
Benchmark Commands With hyperfine
macOSperformancescriptingcli

Measure and compare the runtime of shell commands with statistics.

Low risk ✓ 2026-09-22
Record Terminal Sessions With asciinema
macOSTerminalscripting

Capture a full terminal session as a tiny, text-based .cast file.

Low risk ✓ 2026-09-20
Parse and build paths with Split-Path and Join-Path
WindowsFilesscriptingpowershell

Stop slicing strings with .Substring() — PowerShell has dedicated cmdlets to pull apart and reassemble file paths.

Low risk ✓ 2026-09-17
find -printf: custom-formatted output with size and date
Linuxscriptingformatfind

Use GNU find's -printf to print paths, sizes and timestamps in any layout, ready for sorting or scripts.

Low risk ✓ 2026-09-17
Read a whole file as one string with Get-Content -Raw
WindowsFilesscriptingpowershell

Without -Raw, Get-Content splits files into line arrays — a trap that breaks multi-line regex and exact string comparisons.

Low risk ✓ 2026-09-17
Run JavaScript With Bun
macOSpackagesbuildscripting

Execute scripts, install packages and bundle projects with one fast binary.

Low risk ✓ 2026-09-22