Hi All,
I copied an existing script so that I could make updates to it and test those updates.
In both scripts I set the path which is the exact same in both scripts as I copied from the old to the new script.
setting path is this command:
# Add the path required for EMC commands to run correctly
export PATH=$PATH://usr/bin:/etc:/usr/sbin:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin
In the old script there is absolutely no problem with this path setting whether you run it manually or via the crontab.
In the old script when it runs the path settings I get the following output:
$ sudo ./DAILYCHECKS.VMAX.sh.old.08022012
+ export PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/isoscwi/bin:/usr/bin/X11:/sbin:.:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin://usr/bin:/etc:/usr/sbin:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin
In the NEW script when it runs the path settings I get the following output:
$ sudo ./DAILYCHECKS.VMAX.sh
./DAILYCHECKS.VMAX.sh: ukaixtsm001:/home/isoscwi/CAPACITY: not found
+ export PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/isoscwi/bin:/usr/bin/X11:/sbin:.:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin://usr/bin:/etc:/usr/sbin:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin
./DAILYCHECKS.VMAX.sh: PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/isoscwi/bin:/usr/bin/X11:/sbin:.:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin://usr/bin:/etc:/usr/sbin:/usr/local/bin:/usr/symcli/bin:/usr/emc/scripts:/usr/sbin: is not an identifier
I am a bit confused as to what is going on here, like I said this bit has remained untouched and it is being run from exactly the same place as the old one.
One other thing to add, when I am testing, I have # the export command out while using the sudo ./<script> and it works. I added it into the crontab last night and it ran through but was unable to run any of the commands, which I assume at the moment is because it did not have the PATH set.
Any suggestions on what I might be missing here?
Col