Gratitude Day 19: UNIX Shell

Sat 19 September 2026

Disclaimer: This post was indirectly inspired by a similar (and very enjoyable) post by the amazing Stefano, but it was germinating in my brain long before I realized the thematic similarities.

I've been programming in UNIX shell (mainly ksh, then bash, and now a bit more POSIX shell) for about a quarter century, now. It's really my favorite environment.

First, let's get some common objections out the way.

No serious programmer writes in shell! They use Python, I mean C, I mean assembly, I mean a magnetized needle and a steady hand, I mean C-x M-c M-butterfly

Yeah, you're probably right. Next?

Who needs bash/POSIX shell? My shell has pretty colors, a 3D interactive prompt and status line, full git integration, an app store, and takes full advantage of my GPU-accelerated terminal that runs on my 1024-core gaming computer with its own micro-fusion reactor!

I'm happy for you. Genuinely. 😄


I've been using Unix-based OSes (first various Linux distros, then OpenBSD, FreeBSD, and now NetBSD as well) as my full-time daily-drivers for seven years now. In that time, I've slowly grown a decently sizeable collection of scripts and functions that make daily life way more enjoyable:

rld@Intrepid:~$ echo; \
> echo "   lines   words   bytes"; \
> find bin bin/scripts -maxdepth 1 -type f -exec wc {} + \
>     |grep total \
>     |sed 's|total|(~/bin total)|'; \
> echo "----------------------------------------"; \
> wc .bash_[af]*

   lines   words   bytes
   20870  286632 2146265 (~/bin total)
----------------------------------------
     414    2140   18387 .bash_aliases
    2074    7907   59284 .bash_functions
    2488   10047   77671 total
rld@Intrepid:~$ #functions:
rld@Intrepid:~$ declare -F |grep -c '^declare -f [^_]'
150
rld@Intrepid:~$ #aliases:
rld@Intrepid:~$ alias |wc -l
     135
rld@Intrepid:~$ 

Theres some things that I really, really love about this environment.

First of all, shell scripts and shell functions can build on each other. It's the "write several small tools that do one thing well and can work together" aspect of The Unix Philosophy in motion, and it makes for a really enjoyable experience of slowly building a decent-sized toolchest of utilities organically.

Now, of course, I don't use all of those scripts every day. I don't use most of them hardly at all:

rld@Intrepid:~$ echo; \
> echo "count  epoch-rounded  gregorian-date"; \
> find bin bin/scripts -maxdepth 1 -type f -exec stat -f %a {} + \
>     |sort -n |sed -E 's/[0-9]{6}$/000000/' |uniq -c \
>     |while read line
> do
>     count=${line%% *}
>     epoch=${line##* }
>     printf "%4d %12d     " $count $epoch
>     date -r $epoch
> done

count  epoch-rounded  gregorian-date
 145   1763000000     Wed Nov 12 20:13:20 CST 2025
   9   1764000000     Mon Nov 24 10:00:00 CST 2025
   2   1765000000     Fri Dec  5 23:46:40 CST 2025
   3   1766000000     Wed Dec 17 13:33:20 CST 2025
   1   1767000000     Mon Dec 29 03:20:00 CST 2025
   1   1768000000     Fri Jan  9 17:06:40 CST 2026
   1   1769000000     Wed Jan 21 06:53:20 CST 2026
   2   1770000000     Sun Feb  1 20:40:00 CST 2026
   1   1773000000     Sun Mar  8 15:00:00 CDT 2026
   1   1774000000     Fri Mar 20 04:46:40 CDT 2026
   2   1776000000     Sun Apr 12 08:20:00 CDT 2026
   4   1777000000     Thu Apr 23 22:06:40 CDT 2026
   4   1778000000     Tue May  5 11:53:20 CDT 2026
   3   1779000000     Sun May 17 01:40:00 CDT 2026
  11   1780000000     Thu May 28 15:26:40 CDT 2026
   1   1781000000     Tue Jun  9 05:13:20 CDT 2026
   2   1782000000     Sat Jun 20 19:00:00 CDT 2026
   2   1784000000     Mon Jul 13 22:33:20 CDT 2026
   1   1785000000     Sat Jul 25 12:20:00 CDT 2026
   6   1787000000     Mon Aug 17 15:53:20 CDT 2026
  16   1788000000     Sat Aug 29 05:40:00 CDT 2026
   3   1789000000     Wed Sep  9 19:26:40 CDT 2026
rld@Intrepid:~$ 
rld@Intrepid:~$ find bin bin/scripts -maxdepth 1 -type f |wc -l
     221
rld@Intrepid:~$ 

In the above code snippet, I've taken the atime (last access time) of every file in my ~/bin directory, rounded it (well, truncated) to the nearest million seconds (11 days, 13:46:40), printed how many files were accessed within that million second window, and printed the Gregorian date equivalent of that epoch date.

According to the above, I set up this laptop some time last November (accurate), and I've only used 25 of my 211 scripts in the last month or so.


Oh wait... I've just realized that atime on this system is not reliable. I should have known, derp:

rld@Intrepid:~$ mount |grep noatime
zroot/ROOT/14.3-RELEASE-p6_2025-12-05_225632 on / (zfs, local, noatime, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot/home/rxl on /home/rxl (zfs, local, noatime, nfsv4acls)

So instead, I went through my command history on this machine for the past month, and analyzed what commands/scripts/aliases I used:

  1 cal2 is an alias
  1 cdclip is an alias
  1 clipclear is /home/rld/bin/clipclear
  1 cppwd is an alias
  1 de_banner is /home/rld/bin/de_banner
  1 dectohex is /home/rld/bin/dectohex
  1 fedimeteo is an alias
  1 figletfonts is an alias
  1 freebsdfree is /home/rld/bin/freebsdfree
  1 help is an alias
  1 mcd is a function
  1 notice is /home/rld/bin/notice
  1 ramhogs is a function
  1 snarfclear is /home/rld/bin/snarfclear
  1 snarfi is /home/rld/bin/snarfi
  1 stls is a function
  1 strip-jpeg-MP is /home/rld/bin/strip-jpeg-MP
  1 swc is a function
  1 temps is /home/rld/bin/temps
  1 tootuser is /home/rld/bin/tootuser
  1 ulocate is /home/rld/bin/ulocate
  1 uptime is an alias
  1 weather is an alias
  1 webview is a function
  1 zipinfo is an alias
  2 /home/rld/Documents/writings/blog/pelican/content/count2
  2 binfind is a function
  2 clear2 is an alias
  2 clipi is /home/rld/bin/clipi
  2 edvis is a function
  2 ifsn is a function
  2 showclip is /home/rld/bin/showclip
  2 visway is an alias
  3 /home/rld/battery_ctrl.sh
  3 bookmarks is an alias
  3 dwroulette is /home/rld/bin/dwroulette
  3 edir is an alias
  3 emoji-picker is /home/rld/bin/emoji-picker
  3 giturl is a function
  3 pwdl is a function
  3 searchall is /home/rld/bin/searchall
  4 tootlookup is a function
  4 yt-dlp is an alias
  5 battime is an alias
  5 blogwordcount is /home/rld/bin/blogwordcount
  5 datestamp is /home/rld/bin/datestamp
  5 duh is /home/rld/bin/duh
  5 ffprobe is an alias
  5 sdiff is an alias
  5 updateall is /home/rld/bin/updateall
  5 yt-mpv is /home/rld/bin/yt-mpv
  6 grepc is a function
  6 invid is a function
  6 snarftoclip is /home/rld/bin/snarftoclip
  6 toot is an alias
  7 /home/rld/Documents/writings/blog/pelican/content/count
  7 /home/rld/Documents/writings/blog/pelican/content/mksymlink
  7 cp is an alias
  7 df is an alias
  7 mpv is an alias
  7 open is an alias
  7 tootme is /home/rld/bin/tootme
  8 battestimate is a function
  8 blogme is /home/rld/bin/blogme
  8 daylog is /home/rld/bin/daylog
  8 free is an alias
  8 lsgrep is a function
  9 fcal is /home/rld/bin/fcal
  9 histbackup is /home/rld/bin/histbackup
  9 mv is an alias
  9 pkgbins is /home/rld/bin/pkgbins
  9 unixnotes is a function
 10 psgrep is /home/rld/bin/psgrep
 11 s is an alias
 12 ststatus is an alias
 14 snarfedit is hashed (/home/rld/bin/snarfedit)
 15 nsxiv is an alias
 16 dict is an alias
 16 rld is an alias
 16 wifiscan is a function
 19 biblegrep is a function
 23 /home/rld/Documents/writings/blog/pelican/blogcal
 26 clipo is /home/rld/bin/clipo
 28 snarfo is hashed (/home/rld/bin/snarfo)
 64 ll is an alias
 71 duck is /home/rld/bin/duck
 86 grep is an alias
223 ls is an alias

Sorry if this schlocky, sleep-deprived technomissive isn't quite comprehensible today. I'm gonna call it a blost. CHEERS! 😂

Back to index

 

Category: Tech
Tags: BSD   Computing   FOSS (Free and Open Source Software)   FreeBSD   Hobbies   Linux   Monthly themes   Non-religious post   Productivity   UNIX   Unix Tips  


Package Manager Tier List

Tue 12 May 2026

I was thinking about Arch's pacman this morning, mentally noting once again how insanely fast it is compared to all of the other package managers I've used.

So, I thought I'd put out an informal package manager tier list, based primarily on speed, and just going on my own …

Category: Tech
Tags: BSD   Computing   FOSS (Free and Open Source Software)   FreeBSD   Hobbies   Humor   Linux   Non-religious post   Polemic   Productivity   UNIX  

Read More

I Loved Computers Before the Internet was a Thing

Fri 10 April 2026

A reconstruction of the Commodore 64's BASIC prompt
A reconstruction of the Commodore 64's BASIC prompt, adapted from Wikipedia

I loved computers before the internet was a thing, and I will continue enjoying them long after the internet becomes an unusable hellhole of mass surveillance, age verification, deplorably invasive technical "standards," and hyper-aggressive advertising.

I've seen truly enormous …

Category: Humor
Tags: BSD   Computing   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Hobbies   Humor   Life   Linux   Non-religious post   Non-technical post   Productivity   Retrocomputing   Social Media   UNIX  

Read More

Monocultures Considered Harmful or: Why Linux Nerds Should Give BSD and Other "Weird" OSes a Try

Sun 11 January 2026

In yesterdays's article, I described the benefit of having a large supply of physical hardware to try different OSes on. Now I would like to talk about why it's important to run more than just various Linux distros (although just trying different distros is a great way to start broadening …

Category: Philosophy
Tags: BSD   Computing   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Hobbies   Linux   Non-religious post   Philosophy   UNIX  

Read More

Why You Need A Stack of Thinkpads

Sat 10 January 2026

Modified image of a stack of thinkpads taken originally from https://old.reddit.com/r/thinkpad/comments/17xf8kl/my_thinkpad_stack/ Modified image of a stack of thinkpads taken originally from https://old.reddit.com/r/thinkpad/comments/17xf8kl/my_thinkpad_stack/

A lot of people experience vendor lock-in and outright "ecosystem captivity" because they've plunked down several grand towards pricey and shiny laptops from Apple, Microsoft (*snicker*), Samsung, or whomever. Such a …

Category: Tech
Tags: Computing   FOSS (Free and Open Source Software)   FreeBSD   Hobbies   Linux   Non-religious post   UNIX  

Read More

"Online" documentation should be offline

Thu 30 January 2025

I'm noticing a troubling trend among FOSS projects, even terminal-only utilities: no manpages (or a 1-paragraph useless one), barely any help screens, and a link to a wiki site like a github page or "readthedocs."

The thing is, the whole ethos behind so many terminal utilities is a hearkening back …

Category: Tech
Tags: 100DaysToOffload   BSD   Computing   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Linux   Non-religious post   Polemic   Productivity   UNIX  

Read More

What is FOSS?

Sun 24 November 2024
Note: This article was originally written last December, and was sidelined because I didn't feel it was finished. Reading through it this morning, I realized reason that I never "finished" it is because the next step would've been to write a 1280-word chapter, which is no small feat. But honestly …

Category: Tech
Tags: BSD   Computing   Content Warning   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Linux   Non-religious post   Philosophy   UNIX   WritingMonth  

Read More

Use what works for good

Tue 26 December 2023

Exactly a month ago, I wrote an article challenging the prevalent pragmatist-argument for choice in the digital world.

I'd like to refine that thought a bit further, based on recent experiences.

A little over a week ago, I started crafting an article covering FOSS keyboards for Android. This is one …

Category: Ethics
Tags: BSD   Computing   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Linux   Non-religious post   UNIX  

Read More

*Don't* use what works for you

Sun 26 November 2023

I was watching a youtuber I rather like, and he closed out his video talking about his pragmatic approach to operating systems. He said he used multiple OSes (some FOSS and some non-FOSS), and he summed up his approach with "Use what works for you."

This is not a polemic …

Category: Ethics
Tags: BSD   Computing   Ethics   FOSS (Free and Open Source Software)   FreeBSD   Linux   Non-religious post   UNIX   WritingMonth  

Read More
Page 1 of 1