I'd like to create a bash script that would live on a USB thumb drive and copy over some files from that same USB drive, onto the Mac it's plugged into. How can I refer to the path the script is executing from, even if the name of the drive has changed or it's not mounted under /Volumes ?
I suppose it's possible to mess around with the $0 parameter, but will that work even if the script is created as a .command file, and run by the Finder?
I suppose it's possible to mess around with the $0 parameter, but will that work even if the script is created as a .command file, and run by the Finder?