Scripting linux commands to modify data in files

view full story

http://stackoverflow.com – I have a series of devices that I need to SSH into, modify some files changing the device name, and network settings. The files contain data such as: NETWORK_ETH1_CLIENTIP_LIST='' HOSTNAME="c50" I am using putty to ssh in to the system, and then using nano to modify each file. I believe it would be easy to script but I am not too sure of the linux commands for what I would like to do. Are there commands in linux I could use that could search for strings within a specified text file, e.g. "HOSTNAME" and replace the found line with the new HOSTNAME? I am current using plink f (HowTos)