LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting temporary pathing in bash script. (https://www.linuxquestions.org/questions/linux-newbie-8/setting-temporary-pathing-in-bash-script-4175648964/)

Robert_S 02-24-2019 09:07 AM

Setting temporary pathing in bash script.
 
I'm trying to get nethack to run. I got it built, but it's not finding the sysconf file, which is there. I can see it.

I'm thinking it's just making a generic call, but because the path to sysconf is not in $PATH, it's not finding it.

I only want the pathing for when I run the game. I don't want to make it permanent in my .profile.

Is this possible?

pan64 02-24-2019 09:10 AM

PATH is only used to find executables, not for config files. That should be something else.
Code:

PATH=<value> command args
can be used to specify PATH (or any other variable) only for a single command.

ondoho 02-24-2019 09:33 AM

why are you compiling it?
which distro are you using?
on Ubuntu alone there's 4 different versions in the repos.

Robert_S 02-24-2019 10:03 AM

Quote:

Originally Posted by ondoho (Post 5966275)
why are you compiling it?
which distro are you using?
on Ubuntu alone there's 4 different versions in the repos.

Slackware

Robert_S 02-24-2019 10:04 AM

Quote:

Originally Posted by pan64 (Post 5966269)
PATH is only used to find executables, not for config files. That should be something else.
Code:

PATH=<value> command args
can be used to specify PATH (or any other variable) only for a single command.

Okay, I'll have to look at the code.

ADDENDUM: Please disregard. I must have been doing something wrong or a subsequent compile worked or something, because it suddenly started to see the file. All is well.


All times are GMT -5. The time now is 09:21 PM.