Useful Glob

Because cracksmoking MacOS likes to change the names of drive mounts unpredictably (mostly by adding things like “-1” and “-2” to them) when it gets confused, I had to use globbing to reliably identify a mounted volume/directory in my Bash scripts. Here’s what I did:

for VOL in /Volumes/myvol*; do
    # Check if it's actually a directory
    if [[ -d "$VOL/mydl/thisdir/here" ]]; then
        DEST="$VOL/mydl/thisdir/here"
        break
    fi
done

This finds the first item named “myvol” and in a later part of the script not excerpted here slaps what you want in there. But warning: this snippet like Cisco stuff takes action immediately on the first match only, so if you might have more than one match just be aware of that and modify as needed.

Why the world stopped making sense: How the neoliberal “class war” fueled global chaos.

Employee monitoring app leaks 21 million screenshots in real time.

How the left can win: Drop the statistics and tell real people’s stories.

The Friendship Recession: The Lost Art of Connecting. Another thing very obviously definitely occurring that “scientists” insist is not happening.

Every complex ecosystem has parasites.

The Impact of New Housing Supply on the Distribution of Rents.

Expanded phylogeny elucidates Deinosuchus relationships, crocodylian osmoregulation and body-size evolution. Basically: more nommable food, get mad big!