Setting up a path in UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Setting up a path in UNIX
# 8  
Old 08-04-2011
Quote:
Originally Posted by bartus11
Did you try this?
Code:
find / -name "get_inf_env" -type f

It will take a while to finish but it will find it if it is present on your server.

That was awesome..I am able to find the path of "get_inf_env". I am able to find the utility in 2 directories which are mentioned below:

/usr/infa/ie/bin
/usr/infa/dv03/bin

which 1 do i need to consider ?
# 9  
Old 08-04-2011
Well, this question should be directed to someone knowing of the application you are using. I would try setting it to the first directory and see what happens. If the script is not running properly, then set it to the second one Smilie You can also do
Code:
ls -l /usr/infa/ie/bin/get_inf_env
ls -l /usr/infa/dv03/bin/get_inf_env

and see if the size is the same, which would suggest that it is the same utility stored in two places and it wouldn't matter which directory you chose.
This User Gave Thanks to bartus11 For This Post:
# 10  
Old 08-05-2011
Quote:
Originally Posted by bartus11
Well, this question should be directed to someone knowing of the application you are using. I would try setting it to the first directory and see what happens. If the script is not running properly, then set it to the second one Smilie You can also do
Code:
ls -l /usr/infa/ie/bin/get_inf_env
ls -l /usr/infa/dv03/bin/get_inf_env

and see if the size is the same, which would suggest that it is the same utility stored in two places and it wouldn't matter which directory you chose.

Thanks for that.. it was of the same size. I have included the path in the script.
Code:
$ head -10 file
#!/bin/ksh
PROG=$0;export PROG
PATH=/usr/informent/dv03/bin/get_inf_env:$PATH;export PATH
ORAUSER=`get_inf_env INFORM_DB_ACCOUNT`;export ORAUSER
BATCH_HOME=`get_inf_env INFORM_DATA_HOME`

But am not able to run the script..Any help ?

Last edited by Franklin52; 08-06-2011 at 04:41 PM.. Reason: Please use code tags for data and code samples, thank you
# 11  
Old 08-05-2011
Code:
#!/bin/ksh
PROG=$0;export PROG
PATH=/usr/informent/dv03/bin:$PATH;export PATH
ORAUSER=`get_inf_env INFORM_DB_ACCOUNT`;export ORAUSER
BATCH_HOME=`get_inf_env INFORM_DATA_HOME`

Jean-Pierre.
This User Gave Thanks to aigles For This Post:
# 12  
Old 08-05-2011
Thanks. I am done with that. But when am trying to invoke the script am not able to run the script SmilieSmilie

$test
$

What are the possible ways of invoking a script?
# 13  
Old 08-05-2011
Show us more about your script.

Jean-Pierre.
# 14  
Old 08-05-2011
I hope this will suffice. If not I will show the entire script. Thanks
Code:
$head -20 test
#!/bin/ksh
PROG=$0;export PROG
PATH=/usr/informent/dv03/bin:$PATH;export PATH
ORAUSER=`get_inf_env INFORM_DB_ACCOUNT`;export ORAUSER
BATCH_HOME=`get_inf_env INFORM_DATA_HOME`

usage()
 {
          echo "                                                                                         "
          echo "__________________________ test_tool_compare_________________________________________    "
          echo "                                                                                         "
          echo "Usage... test_tool_compare (Release 1.0)  June, 2011                        "
          echo "This script generates output to support the parallel test of Partenon generated source    "
          echo " files with Source One generated files.  One test is run per file format.  The Partenon  "
          echo " file is loaded to Informent, saved off to another table, and the SourceOne file         "
          echo " is loaded to Informent and saved to another table.  The data in the 2 saved off tables  "
          echo " are manipulated to create tables, views and reports to assist an analyst with  verifying "
          echo " the parallel data loaded.                                                               "
          echo "                                                                                         "
          echo "The user is prompted to enter File Format, the SourceOne physical file name involved     "
$


Last edited by Franklin52; 08-06-2011 at 04:41 PM.. Reason: Please use code tags for data and code samples, thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting class path

hi , can anybody help me to chage the class path in unix server.. what are the files need to update .... (2 Replies)
Discussion started by: Madhu Siddula
2 Replies

2. UNIX for Dummies Questions & Answers

Is there any $PATH default setting?

This is a very newbie's question: I was trying to add a new version of the same command "blastn", but the old command always shows up first. which blastn /usr/local/bin/blastnThe two versions of the same command "blastn" are located in: which -a blastn /usr/local/bin/blastn... (5 Replies)
Discussion started by: yifangt
5 Replies

3. Solaris

Setting PATH - Vanishes

Hi , I new to solaris. I want to set path variable . Eg: JAVA_HOME. When i do this, #JAVA_HOME=/usr/jdk/jdk1.6 #export JAVA_HOME #echo $JAVA_HOME /usr/jdk/jdk1.6 Then its ok. When i toggle to bourne shell or if i log off or restart. then JAVA_HOME is echoed blank. How to set... (4 Replies)
Discussion started by: gnanagurus
4 Replies

4. Solaris

Problem Setting $PATH

I am trying to install the pkg-get package to a fresh install of Solaris 10. I am able to download and install correctly using the default directory for both pkg-get and wget as found on blastwave.org. When I issue the command "which wget and which pkg-get" it returns no wget or pkg-get found in... (1 Reply)
Discussion started by: greengrass
1 Replies

5. Shell Programming and Scripting

Setting path

Hi all, I have a java command in a shell script. When i m executing the command from the prompt its working fine. But when i paste the same command in a shell script and execute the shell script it says path not found. Please help. (5 Replies)
Discussion started by: radhika03
5 Replies

6. UNIX for Dummies Questions & Answers

Help on setting path variable

Hi there, I need help on setting the path variable. How can I set the path variable with Bourne Shell. My scripts goes like this, but did not work. #!/bin/sh PATH=/usr/bin:/usr/ucb:/etc:/export/home/zchen/home export PATH Thanks, Z (4 Replies)
Discussion started by: randomcz
4 Replies

7. UNIX for Dummies Questions & Answers

Setting $PATH for a particular file...????

:) dear members; I am trying to placea directory to keep minor records in particular directories.. rather than just rely on hard links.. I would like to set the $PATH variable so that I can access the directory itself from anywhere; ex./ /tmp or /bin /var... I know how to export enviromental... (4 Replies)
Discussion started by: moxxx68
4 Replies

8. UNIX for Dummies Questions & Answers

Setting path for GCC?

Dear all, I have downloaded the latest version of gcc --- gcc-3.3.1.tar.gz from gnu.org. My Linux distribution is Mandrake 9.0. This was how I installed it: su - passwrd: mkdir /usr/local/src cd /usr/local/src gunzip /tmp/gcc-3.3.1.tar.gz #where I downloaded the file tar xvf... (2 Replies)
Discussion started by: HOUSCOUS
2 Replies

9. UNIX for Dummies Questions & Answers

Global PATH setting

I am using Solaris 8 and I want to change the PATH setting for all users. I have edited /etc/profile, but when I log in and check the PATH variable, it hasn't changed. Am I missing something? (5 Replies)
Discussion started by: jxh
5 Replies
Login or Register to Ask a Question