Results 1 to 2 of 2
Thread: Shell script to change host name
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Nov 2007
Shell script to change host name
Thanks in advance
Is this homework?
Well I am not going to give you the script since helping with homework is not allowed on the forums.
but I can advice you.
There is a file were you can find the hostname.
The System reads it for the hostname.
If you write a script to extract that line out of the file. To show the current hostname and then change it.
Its really easy. Id do this with Perl if Id were you.
You'll need to read the file line by line. Till its the right string you are looking for
Hope I helped you without betraying something