Search environment variables for paths


 
Thread Tools Search this Thread
Operating Systems HP-UX Search environment variables for paths
# 1  
Old 06-14-2010
Search environment variables for paths

Hi,

I am using the HP machine at the moment and by default I have been setup with the kron shell i.e. my home profile is .kshrc

I would like to access a program anywhere on the system so I have added a path and created an environment variable like this:

export myvarpath=/a/abc/def/ghij

I then activate these changes and check its been setup under my list of env vars. My question is why I still cannot find my program under this dir?

It seems to only search the PATH var but no other, am I missing soemthing here as I understood that by default on the unix by default all env vars should be searched for when you type a command in the terminal.

ThanKS

cf
# 2  
Old 06-14-2010
Nothing stopping you after to update your PATH variable:
Code:
export PATH=$PATH:$myvarpath

Yes PATH is for search path for executables and MANPATH for all manuals...
# 3  
Old 06-14-2010
So I guess even though I had set up a path on my own mad up variable this will never be searched for.

Thanks

---------- Post updated at 08:14 AM ---------- Previous update was at 08:10 AM ----------

export myvarpath=/a/abc/def/ghij
export PATH=$PATH=myvarpath

this doesn't seem to work?

---------- Post updated at 08:16 AM ---------- Previous update was at 08:14 AM ----------

Sorry missed the : instead of ==
# 4  
Old 06-14-2010
And the $ to myvarpath also...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Environment Variables

Hi All, I need to understand following three environment variables and their usages in HP Unix. _M_ARENA_OPTS _M_CACHE_OPTS PTHREAD_SCOPE_SYSTEM How does these environment variables influence multi threaded applciation and how do we decide the value of these variables? Is there... (0 Replies)
Discussion started by: angshuman
0 Replies

2. Shell Programming and Scripting

Search and compare files from two paths

Hi All, I have a 2 path, one with oldfile path in which has several sub folders,each sub folders contains a config file(basically text file), likewise there will be another newfile path which will have sub folders, each sub folders contains a config file. Need to read files from oldfile... (6 Replies)
Discussion started by: Optimus81
6 Replies

3. Shell Programming and Scripting

Environment variables

I have read tons of posts about how you can't set persisting environment variable in a child script of a shell and have it persist. The only way is to source a file as % . <scriptname> I am finding that true... but I know there is a way around it. I just don't know how. I worked for 6... (5 Replies)
Discussion started by: rwa25
5 Replies

4. UNIX for Dummies Questions & Answers

Environment variables

why are all environment variables represented in a fixed format regardless of the shell you use? like $HOME $PATH etc (6 Replies)
Discussion started by: sravani
6 Replies

5. Shell Programming and Scripting

Variables in paths dont get displayed

I have a variable embedded in a path, and when I print the path, the variable name gets printed out, and not the actual value. Here is an example. NODE='database1' j='/home/log/$NODE/alert$NODE.log' echo $j Result that I got : /home/log/$NODE/alert$NODE.log Result that I... (8 Replies)
Discussion started by: matabani
8 Replies

6. Shell Programming and Scripting

using environment variables

say i define an environment variable in a particular script (upgrade.sh). my script is upgarde.sh and it calls another script try.sh. will this environment variable be accessible to try.sh also. if not how to I make environment variables global so that they can be used by any script. (2 Replies)
Discussion started by: lassimanji
2 Replies

7. Programming

environment variables

hi, I want to create a new EV(Environment Variable) through a c program and I done this thing through setenv() method. But the newly created EV is not permanent, i.e. when I exit from the program the EV also no longer lives. But I want to make it a permanent EV for the current user. Actually I... (6 Replies)
Discussion started by: sumsin
6 Replies

8. UNIX for Dummies Questions & Answers

help..Environment variables...

hi, 1). i would like to know what is meant by environment variables? 2). is the number of envi variables is a constant number for unix systems? 3). how to see the list of envi variables (and the values of the envi variables)in a single command? 4). if this questions were already asked... (3 Replies)
Discussion started by: sekar sundaram
3 Replies

9. Programming

environment variables

Hi! How-to get the environment variables in GNU. getenv() only fetches the ones that you can find under export (not the ones under declare)... best regars .David (2 Replies)
Discussion started by: Esaia
2 Replies

10. UNIX for Dummies Questions & Answers

what is the use of Environment variables

what is the actual use of environment variables. I know only PS1, LOGNAME, PS2 variables what are the other variables & what is there use (2 Replies)
Discussion started by: indianguru
2 Replies
Login or Register to Ask a Question