This is how I add multiple aliases to /etc/bash.bashrc
:
cat <<-"BASHRC" >> /etc/bash.bashrc
alias rss="/etc/init.d/php*-fpm restart && systemctl restart nginx.service"
alias brc="nano /etc/bash.bashrc"
alias www="cd /var/www/html"
alias imb="bash /opt/imb.sh"
alias nwsm="bash /opt/nwsm.sh"
BASHRC
source /etc/bash.bashrc
I feel I could pass on the heredocument and use some other way that would also check if the aliases are already there, is there a simple solution for that?