shell

Thursday, January 28, 2021

til
A bunch of Unix date scripting things Unix shell scripting is not one of my better-know areas of programming, but it’s on my list of things to learn. Some interesting bits about the date function.1 Want the long date, like Thursday, January 28, 2021? → date +"%A, %B %d, %Y" Want something like the above but with abbreviated month Thursday, Jan 28, 2021? → date +"%A, %b %d, %Y" Time zone in the format of "-05:00" on macOS is: #!

Extracting ID3 tags from the command line - two methods

As part of a Hazel rule to process downloaded mp3 files, I worked out a couple different methods for extracting the ID3 title tag. Not rocket science, but it took a little time to sort out. Both rely on non-standard third-party tools, both for parsing the text and for extracting the ID3 tags. Extracting ID3 title with ffprobe ffprobe is part of the ffmpeg suite of tools which on macOS can be installed with Homebrew.

Partitioning a large directory into subdirectories by size

Since I’m not fond of carrying around all my photos on a cell phone where they’re perpetually at list of loss, I peridiocally dump the image and video files to a drive on my desktop for later burning to optical disc.1 Saving these images in archival form is a hedge against the bet that my existing backup system won’t fail someday. I’m using Blue-Ray optical discs to archive these image and video files; and each stores 25 GB of data.