Writing files from the shell
You don't need an editor for small files. echo plus a redirect is enough:
The rule from the pipelines course still holds: > replaces, >> appends.
Real world: echo "export PATH=$HOME/bin:$PATH" >> ~/.bashrc is how a lot of install instructions add a line to your shell config. Now you know why it's >>.