ksh export


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ksh export
# 1  
Old 07-15-2008
ksh export

Hi,

What is the difference between the following two usage of export?
export VARIABLE_NAME;VARIABLE_NAME=value
and
export VARIABLE_NAME=value

Cheers,
Vish
# 2  
Old 07-15-2008
>export VARIABLE_NAME;VARIABLE_NAME=value
*the above will not satisfy you... (the variable changes after the export...)
>export VARIABLE_NAME=value
* This is the new syntax replacing VAR=value; export VAR
 
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. Shell Programming and Scripting

how can I export an alias and use it in any shell that I want to switch to like bash, ksh

None of the aliases that I set are available if I switch to a different shell. How can I export aliases and make them available in any shell that I switch to like ksh or bash ? I tried these $>alias godata='cd /home/kc/app/data' $>alias -x godata='cd /home/kc/app/data' $>alias |... (2 Replies)
Discussion started by: kchinnam
2 Replies

3. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

4. Shell Programming and Scripting

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... (4 Replies)
Discussion started by: SWEngineer
4 Replies

5. Shell Programming and Scripting

export variable from ksh script doesn't work

Hi there, in a script I have #!/usr/bin/ksh TEST=hello export TEST Problem is, that the variable doesn't get exported. I also tried typeset -x TEST=hello When I put the two lines in my .profile, the variable is set fine. Whats could be the problem here? (4 Replies)
Discussion started by: doc_symbiosis
4 Replies

6. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

7. 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

8. Shell Programming and Scripting

Export Arrays in ksh

Hello everybody! Why I can export arrays in ksh? I trie this for exemplo: In parent script array=a array=b array=c export array When I see the variable array in child script there are only first index. For exemplo in child script +echo ${array} a (3 Replies)
Discussion started by: ricardo.ludwig
3 Replies

9. 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

10. 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
Login or Register to Ask a Question