Useful shell scripts

Timothy Keith 1452981346 mount-cache added 10 months ago
.readme-assets f5dabb72c9 added additional natgeo-wallpaper screenshots 1 year ago
attic 1452981346 mount-cache added 10 months ago
autostart 1452981346 mount-cache added 10 months ago
fun ee6f1926d7 swatch time added 11 months ago
wallpaper e560af501d link READMEs and add ~/bin to subdir paths 1 year ago
.gitignore 1a923bb47f why did I make this? 1 year ago
LICENSE ca5c06098d linewrap 1 year ago 48dfc008c6 added new scripts 1 year ago
backup 64d51ac26f simplier tar and parallel bzip2 1 year ago
base64-img f16203f2a7 saves image in base64 format, useful for inline HTML or CSS 1 year ago
clean ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
dd-status aa6ae7abf6 added dd-status 1 year ago
digests ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
encrypt 97b3a692d3 use parallel versions for compresssion 1 year ago
extract 3efac171b4 added parallel and fallback support 1 year ago
freedns-client 77ece9debc added freedns client 1 year ago
gpg-export-key a8462204ea gpg-export-key added 1 year ago
image-avg-color 91b920e77c find the average color of an image 1 year ago
letsencrypt ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
mirror d474cc6a64 removed debugging echo, works fine now 1 year ago
mount-cd ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
mount-media 90c140967d added mount media 1 year ago
net-status ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
nullcrypt 4850704895 changed container dir 1 year ago
optimize-images ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
pdf-extract ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
poor-mans-proxy eeedb11da3 resolver option 1 year ago
rangen d1daa69eee xkcd-pass merged into rangen 1 year ago
sl 53d1caadc3 added sl 1 year ago
speedtest 7a65a17126 cli speedtest without many external deps 1 year ago
tclock 2164638bcf added tclock 1 year ago
test-colors ed7ae9de2e whole *.sh extension is obnoxious to have to type 1 year ago
update-firefox 42c7891a99 update firefox and install it to the local user's ~/.local/bin 1 year ago
update-youtube-dl 6d9e005b13 renamed to match other script naming convention 1 year ago 46a2532794 trailing whitespace 1 year ago 39ab20aea4 trivial python webserver 1 year ago
whois bf8ccfac34 trivial whois client 1 year ago
youtube-dl-parallel c32114622e renamed youtube-dlp 1 year ago
youtube-play 88ce676b96 added youtube-play 1 year ago

~/bin Codacy Badge Say Thanks!


Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program.

-- Linus Torvalds

These are various shell scripts I have in my $PATH. Most are quite useful, but some are simply novelties to see if a certain problem could be solved in a humble shell script.

Table of Contents:

  • ./attic/*
  • ./fun/*
  • ./wallpaper/*
  • backup: Automatically backup using rsync and tar.gz if space is available
  • base64-img: Convert an image to base64, suitable for Data URIs for HTML or CSS
  • clean: Erases files, directories, browser cache, junk files, history files, and slack space
  • dd-status: Make long-running dd operations print their current status
  • digests: List the various hashsums for a file and create or verify a SHA256SUMS for a directory.
  • encrypt: Wrapper for GPG symmetric encryption using AES256
  • extract: Wrapper to extract from many archives
  • freedns-client: DDNS client for
  • gpg-export-key: Backup both the public and secret key for a given GPG key
  • image-avg-color: Find the average color of an image; useful for website development and theme building
  • letsencrypt: Renew SSL certs for my domains using certbot
  • mirror: Mirror a website sanely with wget
  • mount-cd: Mounts an .iso CD/DVD image to /mnt/cdrom
  • net-status: Show the network status as well as the Gateway and local/public IP addresses
  • nullcrypt: Creates and opens encrypted LUKS containers with sane settings
  • optimize-images: Optimize images for the web by reduces image size and fixing file names
  • pdf-extract: Extract pages from a PDF; useful for removing superfluous and unofficial cover sheets added by many online repositories. Compare to pdftk.
  • poor-mans-proxy: Scrap complicated VPN setups for a simple SSH tunnel
  • rangen: Create random passwords, MAC addresses, letters, or numbers using /dev/urandom
  • sl: cure mistyping bad habits. Slightly more useful than the ubiquitous steam locomotive
  • speedtest: A nice cli network speed test without additional dependances
  • tclock: A nice fullscreen console clock
  • test-colors: Show the current terminal color scheme
  • update-firefox: Download and install locally the latest Firefox. Suitable for Debian users who want the latest Firefox over Firefox ESR
  • update-youtube-dl: Download and install locally the latest youtube-dl version
  • Plaintext weather forecast from NOAA. Generally more timely and accurate compared to commercial websites and APIs
  • start a simple webserver running on port 8080 in the current directory
  • whois: trivial whois replacement that filters annoyingly large legal notices
  • youtube-dl-parallel: Download a large list of videos simultaneously using youtube-dl and GNU Parallel
  • youtube-play: Stream a youtube video using mpv, or fallback to downloading and playing it locally


Complex shell scripts usually include a help/usage statement that can be invoked by passing the typical -h flag.


  • extract: Based on the ArchWiki and Vitalii Tereshchuk's Extract.
    License: GNU FDL & MIT
  • tclock: William Shotts
    License: Similar to GNU's Verbatim Copying License; "Verbatim copying and distribution of this entire article is permitted in any medium, provided this copyright notice is preserved."
  • test-colors: Daniel Crisman's submission to the TLDP's Bash Prompt HOWTO
    License: GNU FDL


I would love your feedback! If you found any of these scripts useful, please drop me an email. For the privacy conscious, feel free to encrypt any messages using my PGP key:

46E6 9F69 90C1 DE8C 9791 88EE 94A4 E2D4 6B32 AA11

To import it into your keyring:

$ curl | gpg --import -

NOTE: SKS Public Key Servers (such as don't support Curve25519 keys yet. In the meantime, consider using; my username is timothykeith.

Bug Reports

Submit bug reports via GitHub's Issue Tracker


Copyright © 2016 - 2017 Timothy Keith, except where otherwise noted.

Licensed under the MIT license.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.