keeler1
14th April 2007, 09:09 PM
Topic mostly has the question covered. I was wondering how the sed command can be used to change a line of a file. I was trying to use the sed command to modify a line of code in /etc/sysconfig/network-scripts/ifcfg-eth1 from RATE='0 kbs' to RATE=Auto but i kept getting errors.
I think it would be something along the lines of sed 's/RATE='0 kbs'/RATE=Auto' /etc/sysconfig/network-scripts/ifcfg-eth1 but I am not certain. Could someone explain what the s does and how the single quotes work. Do the single quotes in the part I want to replace affect it?
I think it would be something along the lines of sed 's/RATE='0 kbs'/RATE=Auto' /etc/sysconfig/network-scripts/ifcfg-eth1 but I am not certain. Could someone explain what the s does and how the single quotes work. Do the single quotes in the part I want to replace affect it?