Add lines of code to files from command line
I would like to be able to add lines of code to files from the command line. For example, if I choose to deny a host in my firewall script I would want to add "iptables -A INPUT -s X.X.X.X -j DROP" from the command line. I tried adding the line of code with "cat [code] >> firewall.script" but got errors. How can I do this?
- Thank you
|