Hacker News new | past | comments | ask | show | jobs | submit login

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




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




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: