Created
August 5, 2022 21:40
-
-
Save wegotoeleven/714a027a17e2ed827dcc200b7dde0708 to your computer and use it in GitHub Desktop.
Find home directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set USERNAME variable to user | |
USERNAME="" | |
USER_HOME=$(/usr/bin/dscl . read "/Users/${USERNAME}" | awk -F ':' '/NFSHomeDirectory/ {print $2}' | awk '{$1=$1};1') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment