On Mon, Jun 1, 2009 at 10:34 AM, Brian Phillips <[email protected]> wrote: > I believe, though I don't have any proof to back me up, that it's considered > good practice to use the full path to the command in scripts, rather than > assume the environment will guide you to the correct binary. Instead of > "snmpget" try "/bin/snmpget" or whereever snmpget is installed on your > system. This may not fix your problem, but it will make a more robust > script.
At least until you try running it in a different environment. Then you might be happier if you had let the system guide you. If we're talking about shell scripting basics, it wouldn't hurt to reiterate that many changes only affect the script itself as it runs. In Bash at least, it helps to *source* scripts instead of merely calling them, and *export* shell variables after you set them in your script if you want the effects of your script to remain in your environment. -------------------- BYU Unix Users Group http://uug.byu.edu/ The opinions expressed in this message are the responsibility of their author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________ List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list
