Shell script not working

Okay, here is the script that works:

If you have to reinstall the OS or move home folder to a different server/harddrive you can get weird permissions problems. This basically pulls the list of users from the netinfo database and matches their user name with their homefolder and makes them owner of it. the egrep part leaves out root and the admin user.

So, I’m trying to make this interactive. I want it to prompt for the IP address, the Netinfo tag, the administrator’s short name, and the path to the home directories. Here is what I have so far:

I know I’m doing something horribly wrong here. Please, someone show me the guiding light and help me out of this hole. I’m going crazy.

You are not getting the command line set up correctly. I don;t know anythign past that.

Instead of backquoting to find fill, put the string in single quotes and echo is out to the command line. Your error should jump out at you.

It may also be an issue that variables have to be enclosed in single quotes to be expanded correctly. Quting issues can be difficult to find.