As the title suggests, I am wanting to create a simple script for system administrators.

When you run this script in a linux shell, it will ask you what you want to set the local systems hostname to (so the admin can type it) and then prompt the administrator for a unique NFS path.

This way the administrator can use one image and then run this script to set the unique hostname, and then set up a local path like /mnt/nfsserver so it connects to the remote NFS server at its unique directory. This way the image doesnt have all workstations connect to the same NFS share... we want each workstation to have its own unique NFS share for their own data.

Any help or code you can provide for me? Im guessing its simple I am just not very good at shell scripting.

Thanks!

are you expecting a ready script? if so, seach on google. if not, and you have a script that doesn't work, post it here, and we will try to see if we can help fix it

Well, I have looked on google and am not finding much.

While I would appreciate someone making me the script, I am fine figuring out the commands and such.

The REAL issue I have that I want someone to "show me the code" on is how do I have a shell script prompt for user input to insert the command? I am just used to automatically running a command, but have never had to prompt for user input...

Check out "read"! It will take the user input and do whatever you want with it.

read -p "what is your name?  " name
echo "Nice to meet you $name"

Hope that helps!
-G

This article has been dead for over six months. Start a new discussion instead.