scripts problem

Hi, the only experience I have with Unix is on C360 workstations using 10.20 and Omniback II to restore email with HP Openmail. I have four brand new machines that I am installing the OS and software on, however, their are scripts that were written specifically for our tape process that I have gotten onto a new machine via FTP, but when I try to use them, they don't work. Can anyone help me understand why not??

Thank you! :stuck_out_tongue:

Have all machines got the operating system installed? What version? Post results on "uname -a".

How are you talking to the machines? FTP is just for file transfer.

I already have six machines, just got four new ones. All are identical, platform is HPUX 10.20. All the old ones have a directory named tapescripts and I have connected via ftp and said "get <name of script>" for each one in that directory. Is this wrong and that's why they don't work correctly on the new machines?

If you got them by FTP, they are probably not executable: chmod 755 scriptname

If you already did that, is your problem could be that you need to do:

./scriptname

because root won't have "." in its PATH.

Hi would you mind telling me exactly what the chmod command will do. Do I have to do that for each individual script name? Not a Unix expert, I should probably be in the Unix for dummies forum. Let's just say I would guard these scripts with my life cuz they save me a crapload of headaches. I didn't write them, needless to say.

I turned on all the permissions for all the tape scripts, I noticed that this is how the scripts are set on the older machines. Unfortunately, they still won't run.

What error do you get ? and can we have a look at the shell script?

You aren't giving us much of a clue, if "they still won't run" surely the shell or something is printing some kind of error, I suggest posting

(a) the attributes of the file, eg "ls -ld filename"

(b) how you try and run the script

(c) the output on the screen when you do try

I am going to use the script "bounceomni" as an example:

Here are the file attributes:

-rwxrwxrwx 1 root sys 256 Sept 20 02:56 bounceomi

This script is supposed to stop and then start the daemons for HP Omniback.

On the older machines, all you have to do is type

# bounceomni

and it works just fine.

If I try it on a new one, I get

# bounceomni
/sbin/sh: bounceomni: not found

I'm certainly no expert, but it seems like something changed in the file when I put it on these new machines via FTP.

Please tell me if there's any other information I could post that would help.

It's not on the PATH. Do the following in working and non-working environments:

echo $PATH

try

./bounceomni

Can you tell me what that first command will do? Why do I not have to type that on the older machines??

The echo $PATH merely shows you the contents of that environment variable.

The older machine may have the PATH configured differently, you say the new machines are fresh installs of the operating system. Do echo $PATH on both machines was a clue to seeing what was different between the environments.

Does this help, make a difference, solve the problem?

Apparently all I had to do was type

# /tapescripts/<script name>

instead of just the script name. I still want to know how I can fix the new ones to behave like the old ones so I don't have to type that, but for now I am thrilled. Thanks so much for your help!!!

You need to find where your user (root?) has it's environment setup at login.