Like so:
% echo 'stuff' >> ~/.zprofile
If something had to be run as root the prefix was # instead, just like in Bourne Shell.Of course this makes it more difficult to copy and paste, you have to do each line one at a time.
Like so:
% echo 'stuff' >> ~/.zprofile
If something had to be run as root the prefix was # instead, just like in Bourne Shell.Of course this makes it more difficult to copy and paste, you have to do each line one at a time.
I was taught that you NEVER copy paste anything from the internet into a terminal. You learn what the commands do, and you type them yourself.
Am I just old?
The sentiment makes sense locally, but at some point you either need to trust the thing you're working with or you do it yourself.
There's not enough time in a day to "learn the commands yourself" for everything you do, but if you personally choose to learn and type the commands yourself, great!
It's also okay to trust others with what you're doing.
If you run brew, you literally are trusting other's install scripts not to do something malicious. (Seems ironic to run the brew command, but not trust the copy/paste it tells you to do?)
Even if you don't run brew and install/compile the software yourself, you haven't read every line of code that the software is running to know if that's truly safe.
It's not ideal, but you need to trust at some level or you're never going to move forward.
# curl foo.com/install.sh | bash -
Best practice, IMO, is to open as dumb an editor as you can find and pasting the commands into an editor buffer for inspection before running anything in the shell. And, if you don’t understand what it’s ask you to paste into your shell, don’t do it.
Even if you run with JavaScript off entirely, this at least makes you think before you do anything potentially destructive.
Especially in a situation where you're trying to install something just to get some other thing to work.