Insert line into a file with a command
I would like to insert a line into the /etc/sysconfig/iptables with a command like sed or with any script.
How can I insert this line:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
but under the line "-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT"