Hacker News new | ask | show | jobs
by Maursault 1919 days ago
nitpik: I prefer to define the $PATH of every command used in a bash script to prevent some possible shenanigans.

sudo="/usr/bin/sudo"

launhctl="/bin/launchctl"

scutil="/usr/sbin/scutil"

nvram="/usr/sbin/nvram"

defaults="/usr/bin/defaults"

et cetera

1 comments

Since APFS firmlinks these binaries you might be setting up some undesirable behavior, especially if a folder is set to read only. :) Most of the time you'll be ok though