I want to echo an alias straight into my .bashrc file. Here is what I am using:
echo alias cdear='cd | clear' >> .bashrc
However, the new line in .bashrc does not contain the quote marks.
I would also like this to go at the end of .bashrc with a line break from the last line.
How can I change my command in order to:
a) ensure the quote marks are retained?
b) ensure the alias is added to the end of the file with a line break?