I need a little help with scripting...
I want to rollout a master hosts file to a number of machines, the only thing is that /etc/hosts file on each machine is slightly different, ie the 5th line will have:
<host ip> <hostname> loghost
Can someone recommend a script that will keep the first 5 lines and append the master hostlist to the end of the /etc/hosts file ?
I guess awk should be used, however I've just started to learn it so am in need of some advice.
Cheers,
themoog
I want to rollout a master hosts file to a number of machines, the only thing is that /etc/hosts file on each machine is slightly different, ie the 5th line will have:
<host ip> <hostname> loghost
Can someone recommend a script that will keep the first 5 lines and append the master hostlist to the end of the /etc/hosts file ?
I guess awk should be used, however I've just started to learn it so am in need of some advice.
Cheers,
themoog