export. I know it, but...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting export. I know it, but...
# 1  
Old 12-26-2009
export. I know it, but...

Hello,

I have the following command at the "Shell":

export PATH=${PATH}:${ANT_HOME}/bin

I know what "export" does and the ANT_HOME part. But, regarding the following part:

${PATH}

What is "PATH" Supposed to be here. In other words, what is the value of "PATH".

As far as for ANT_HOME, I know its value since I've setup that value (ANT path), but just wondering about PATH.

Any ideas?

Thanks.
# 2  
Old 12-27-2009
Quote:
Originally Posted by SWEngineer
Hello,

I have the following command at the "Shell":

export PATH=${PATH}:${ANT_HOME}/bin

I know what "export" does and the ANT_HOME part. But, regarding the following part:

${PATH}

What is "PATH" Supposed to be here. In other words, what is the value of "PATH".

${PATH} is the current value of the PATH variable; the default is typically "/bin:/usr/bin:/usr/local/bin".
# 3  
Old 12-27-2009
Quote:
Originally Posted by SWEngineer
but just wondering about PATH.
Why you have to think much, print that and check.
Code:
echo $PATH

# 4  
Old 12-27-2009
Just to add up to that, PATH is a system variable, which is assigned by the system, and is available through out, while your ANT_HOME is a user variable, initialized and assigned by you and its scope depends on the way you have initialized it..
# 5  
Old 12-27-2009
Hi,

PATH refers to the locations where your command/script will be searched for execution.
if your script/command doesn't lie in the PATH you have to give the absolute path of the same.
exporting path, as you have done, adds ANT_HOME to the variable PATH. so your commands/scripts will also be looked up here for execution.

cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Ubuntu

How use export

Hello, I'm trying to use export for non use "./" when I execute a program. I mean "program" in place of "./program" I tried this: export doit=program But doesn't work the answer is: doit command not found Then, I see the variables using export, and I can see: ... (1 Reply)
Discussion started by: NewBe
1 Replies

2. AIX

nfs export

Hi How to export a file system from my aix box named ABC in such a way that everyone on the network should be able to import it When on the client side if they give showmount -e ABC it should show like this: # showmount -e ABC export list for ABC: /sybase/software (everyone) (2 Replies)
Discussion started by: newtoaixos
2 Replies

3. Shell Programming and Scripting

Oracle export

Hi Experts , Does anybody know the sheel scripts , which exports oracle tables into xls files . Thanks for your feedback. Regards Pranav (1 Reply)
Discussion started by: Heisonline
1 Replies

4. Shell Programming and Scripting

Export variable

Hi I have a pass a variable from one script to another. Here are my scripts Script #1 ./profile #!/bin/sh export NAME="Hello" Script #2 ./test #!/bin/sh ./profile echo $NAME when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Discussion started by: arex876
5 Replies

5. Shell Programming and Scripting

About export

Hi all, I am calling a script from main script. The called script (second script) have to return some value, i can use exit to pass but in exit i have to pass some other value. i used "export Var", but this command resides in a function of second script. could you please tell me how to... (3 Replies)
Discussion started by: Arunprasad
3 Replies

6. BSD

How to export

Hi I need to export some directpry path like below: var1=/<>/<>/<> export var1 This is my basic idea. I tried export var1=/<>/<>/<> after executing this in a shell i did an echo of the var1. But nothing happened. Can you please help me with this. I need to srite a script to... (4 Replies)
Discussion started by: jisha
4 Replies

7. Shell Programming and Scripting

export???

I am trying to export the variable OBJ2 and set it to done. Can some one please let me how to do this? I have tried editing my .bashrc file with this echo <VARIABLE_NAME>=<"OBJ2"> But that wont seem to work... (1 Reply)
Discussion started by: Justinkase
1 Replies

8. UNIX for Dummies Questions & Answers

problem with EXPORT

hi, :) I created a main script called "Paymain.prg" ( /proj/paymain.prg) In this script i created two variables as follows MASTER=/HOME/emaster.dbf TRAN=/HOME/etran.dbf Aftre that i exported that two variables EXPORT MASTER TRAN But when i use these two variable in another script calld... (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

9. Shell Programming and Scripting

export only last two fields?

export only last two fields? here is my test file, with variable length of fields, each line is composed of letter only, and each line has at least 2 fields, fields were separated by dot (.) abcd.abc.mlm dft.dfasdf.bmk.kdjlka ksdfalksdjfsl.tyu.ml kasdjf.asdfkja.asdfj.asdf.df.m lja.ml... (4 Replies)
Discussion started by: fedora
4 Replies

10. Programming

export-dynamic

I load some dynamic libraries from main module (with dlopen). These libraries use 1 function from main module, therefore in Makefile I must use gcc -g -Wl,--export-dynamic,-rpath,./lib -o not not.o db.o -ldl -ldb -lpcap Note option --export-dynamic that is passed to the ELF linker. The... (4 Replies)
Discussion started by: Hitori
4 Replies
Login or Register to Ask a Question