Question: How do you write the exact text to the file instead if it spelling out the $PATH ??
I am trying to copy a line with the echo command to a text file. The command works, however it writes the actual path instead of the text itself.
echo "export PATH=~/.npm-global/bin:$PATH" | cat >> /Users/$CURRENT_USER/.profile
Writes: export PATH=~/.npm-global/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/jamf/bin
Instead of " export PATH=~/.npm-global/bin:$PATH "
I am scratching my head on this and can't seem to find any answers online, running as the user does not seem to work either as Jamf still fills in the $PATH with it's own seen above. Running from terminal as user still fill's in the path instead of the exact text.
Solved! Go to Solution.