I have RHEL and i wish to run a shell script that will add several lines (over 10 lines) to the /etc/hosts file. I tried to use
sed -i "10.161.61.111 acr111" /etc/hosts
sed -i "10.161.61.110 acr110" /etc/hosts
and so on, but i get
sed: -e expression #1, char 3: unknown command: `.'
Any idea how to fix this? Or maybe another way to run sh file which will add hosts to the hosts file? Thanks,