My Personal Scripts for Daily Work
A developer shares the collection of shell scripts he has refined over a decade of daily use, covering clipboard management, file operations, internet tools, text processing, media handling, and process management.

This is a translation of Evan Hahn's article about the shell scripts he uses every day. He's maintained his dotfiles for over a decade, and these are the tools that have survived the test of daily use. Some are trivial one-liners; others are more involved. All of them save time.
Clipboard Management
copy and pasta are wrappers around system clipboard utilities (pbcopy on macOS, xclip on Linux). They normalize the interface so the same commands work on any system. Used constantly — piping command output to the clipboard, pasting file contents, etc.
# Copy file contents to clipboard
cat config.yaml | copy
# Paste clipboard to file
pasta > output.txtpastas ("pasta stream") monitors the clipboard and streams each new entry to stdout. Useful for batch-downloading URLs — copy a list one by one, and pastas | xargs wget grabs them all.
cpwd copies the current working directory path to the clipboard. Simple but used daily when switching between terminal tabs or sharing paths with colleagues.
File Management
mkcd foo creates a directory and immediately cds into it. Used almost every time a new directory is created — it's surprising this isn't a built-in shell command.
mkcd() {
mkdir -p "$1" && cd "$1"
}tempe creates a temporary directory (via mktemp -d) and switches into it. Perfect for experiments and throwaway work — when the terminal closes, you won't accidentally accumulate temp files in your home directory.
trash moves files to the system trash instead of permanently deleting them. Safer than rm and equally fast. Used daily. On macOS it uses the native trash; on Linux it uses trash-cli.
mksh scaffolds a new shell script: creates the file, adds a shebang line and set -euo pipefail, makes it executable, and opens it in the editor. Removes the friction of starting a new script.
mksh my-script
# Creates my-script with:
# #!/usr/bin/env bash
# set -euo pipefail
# Then opens in $EDITORInternet Tools
serveit starts a static HTTP server on localhost:8000 serving the current directory. Essential for web development — testing HTML files, checking asset loading, simulating deployments. Used several times weekly.
getsong downloads audio from YouTube or SoundCloud using yt-dlp at maximum quality. Wraps the common flags so you don't have to remember them.
getpod and getsubs handle podcast episode downloads and subtitle extraction from video files, respectively.
wifi provides quick wireless management commands — connecting, disconnecting, scanning networks, showing current connection details. Useful when troubleshooting network issues.
url parses a URL into its components (protocol, host, path, query parameters). Helpful for stripping tracking parameters or understanding complex redirect URLs.
url "https://example.com/path?utm_source=twitter&id=42"
# protocol: https
# host: example.com
# path: /path
# params: utm_source=twitter, id=42Text Processing
scratch opens a temporary Vim buffer — no file, no save prompt, just a scratchpad for quick text manipulation. Used almost daily for reformatting data, writing quick notes, or composing messages.
straightquote converts smart/curly quotes to straight quotes. Essential when copying text from web pages or documents into code files where smart quotes cause syntax errors. Used weekly.
markdownquote prefixes selected lines with > for Markdown blockquotes. A Vim mapping that saves repetitive editing when writing documentation or forum posts.
uppered and lowered convert text between uppercase and lowercase. nato converts text to the NATO phonetic alphabet — surprisingly useful when reading serial numbers or confirmation codes over the phone.
echo "ABC123" | nato
# Alpha Bravo Charlie One Two Threesnippets retrieves stored text snippets from ~/.config/evanhahn-snippets/. Think of it as a simple, file-based text expander for boilerplate text, email templates, and frequently-typed strings.
REPL Launchers
Quick-access commands that launch interactive shells for various languages:
iclj— Clojure REPLijs— JavaScript (tries Deno first, falls back to Node)iphp— PHP interactive modeipy— Python (prefers IPython if available)isql— SQLite with an in-memory database
These save only a few keystrokes each, but the consistency matters — you always know the command pattern.
Date and Time
hoy (Spanish for "today") outputs the current date in ISO format: 2025-11-02. Used constantly for file naming, journal entries, and timestamps in notes.
timer sets a countdown timer with desktop notifications and audio alerts when it finishes. Used daily for time-boxing work sessions, cooking, and meeting reminders.
timer 25m # 25-minute Pomodoro
timer 1h # One hour reminderrn ("right now") displays the current time, date, and a small calendar. A quick glance when you don't want to move your eyes from the terminal.
Media Tools
ocr extracts text from images using macOS's built-in OCR capabilities. Point it at a screenshot and get the text back on your clipboard. Currently macOS-only.
boop plays a success or failure sound after a command finishes. Attach it to long-running processes so you know when they complete without watching the terminal:
make build && boop || boop failtunes and pix play audio files and display images using mpv. Simple wrappers with sensible defaults.
radio provides quick access to favorite internet radio stations. Just radio jazz or radio classical and music starts playing.
speak converts text to speech using system TTS. Useful for proofreading — hearing your text read aloud catches errors that reading silently misses.
Process Management
each is an alternative to xargs for iterating over command output. More readable syntax for common patterns:
ls *.log | each rm
# Instead of: ls *.log | xargs rmrunning shows processes matching a name, formatted more readably than ps aux | grep. Omits the grep process itself and highlights key information.
murder terminates processes with escalating signal levels — tries SIGTERM first, waits briefly, then SIGKILL if the process persists. More graceful than an immediate kill -9.
bb ("background background") runs commands fully detached from the terminal. Output goes to /dev/null, the process doesn't die when the terminal closes. Useful for launching GUI apps or long-running daemons from the command line.
tryna and trynafail retry commands until they succeed or fail, respectively. Useful for flaky network operations or waiting for services to start:
tryna curl http://localhost:8080/health # Retry until server respondsQuick Reference
emoji searches for emoji by keyword and copies the result to the clipboard. httpstatus displays the meaning of HTTP status codes. alphabet outputs letter sequences — useful for generating lists or test data.
System Management
theme switches between dark and light modes across the OS, Vim, Tmux, and terminal simultaneously. One command to change everything at once.
sleepybear puts the system to sleep, working on both macOS and Linux. A friendlier name for a common operation.
ds-destroy recursively removes .DS_Store files from the current directory tree. Essential for macOS users working with git repositories.
Miscellaneous
catbin displays the source code of executable scripts found in your PATH. Useful for understanding what a command actually does:
catbin serveit # Shows the source of the serveit scriptnotify sends OS-level desktop notifications from the command line. uuid generates UUID strings. Both are simple utilities that avoid the need to Google "how to generate UUID from command line" for the hundredth time.

These scripts represent years of accumulated daily friction, solved one small tool at a time. None of them are revolutionary individually, but collectively they make terminal work significantly smoother. The author hopes some of them prove useful to other developers refining their own toolkits.