I have some shell scripts that need to access paths under /Volumes/
e.g. /Volumes/MyDisk/tmp/foo.json
. Right now the scripts have hardcoded volume names. I would like to make them portable so they run correctly on my various machines, all of which have different disk names for the boot volume.
Can anyone post a reliable method for getting the disk name of the system on a modern macOS system? (13.0.1 as of this writing)