Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.
Absent Member.
686 views

Bash scripting in Netware question

If I'm going to run a scheduled task that executes bash and runs a shell script, do I need to specify full path to all of the commands that are going to be run?
I've run into some issues with my scripts where it seems as if they run well if I'm in bash when I run them, but if I schedule them or attempt to run them from the console (ex. bash sys:\var\script\script.sh), they churn out a bunch of command not found lines, then quit.

in testing I had noticed if I locate the nlm (ex. /usr/bin/wget) and use the full path to it, it will work. I would think there is an easier way though, am I able to just export the path at the beginning of my script? I've seen some other peoples examples of shell scripts in netware, but don't see anyone using full path or having to set the path in their examples.
Labels (1)
0 Likes
1 Reply
Absent Member.
Absent Member.

I think I've found my problem...
a lot of the commands I'm looking for are in /usr/bin, which does not appear to be in the path by default, though /bin does.
adding "PATH=$PATH:/usr/bin/ ; export PATH" to the beginning of my script looks like it fixes the problem
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.