Exploring permutations and a mystery with BSD and GNU split filenames

Recently, I was playing around with the split command-line tool on Mac OS X, and I decided to chop a 4000-line file into 4000 separate single-line files. However, when I attempted to run split -l1, I ran into a funny error: split: too many files Curious to see if any splitting had occurred, I ran ls and sure enough, a huge list of filenames appeared, such as: xaa xab ... xzy xzz Now I could see why you’d run out of unique filenames - there are only 26 letters in the alphabet and these filenames were only three letters long....

January 22, 2018 · Loraine

Bash Prompt Mods: Last Command Time and Conditional Exit Codes

I’ve been spending a lot of time thinking about how I can improve my bash productivity and understand when / why things have gone wrong sooner. Luckily, I stumbled upon this golden blog post by Jake McCrary. Put the last command’s run time in your Bash prompt via @climagic #linux #unix #programming https://t.co/vdi521B4a2 — nixCraft # (@nixcraft) September 15, 2016 I decided to adopt some of his prompt suggestions on tracking the last command and put my own spin on the additions....

October 1, 2016 · Loraine