As an example: When installing pyenv
, you're required to add
export PATH="/home/user/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
to your .bashrc
file.
However, the usual echo '..' >> ~/.bashrc
will evaluate the statements before appending. How do you properly append such statements to a file using the command line without evaluation?
~/.bashrc
. Either provide more information about your system and setup, or open~/.bashrc
in a text editor and write the lines by handecho '..'
vsecho ..
and as such, simply piping line by line into the file may indeed solve the issue. Nevertheless, steeldriver has provided a concise and scalable solution.