Beginner export problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Beginner export problem
# 1  
Old 12-06-2006
Beginner export problem

Me dumb. Can't get this to work...

#!/bin/sh
export JAVA_HOME_BAK=${JAVA_HOME}
or
#!/bin/sh
export JAVA_HOME_BAK=/usr/java
or
#!/bin/sh
export JAVA_HOME_BAK=$JAVA_HOME
or
#!/bin/sh
export JAVA_HOME_BAK $JAVA_HOME

etc.... none work.

Either i get: "JAVA_HOME_BAK=/usr/java: is not an identifier"
or "/usr/java: is not an identifier"

I know its going to be quick and easy, but what is it?
# 2  
Old 12-06-2006
Code:
#!/bin/sh
JAVA_HOME_BAK=$JAVA_HOME
export JAVA_HOME_BACK

Code:
#!/bin/ksh
export JAVA_HOME_BAK=$JAVA_HOME

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in understanding export uses

i am beginner in shell scripting. not able to understand what below line will do. PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST below is the script #!/bin/hash PS1=${HOST:=Žuname -nŽ}"$ " ; export PS1 HOST ; echo $PS1 and i getting the below output Žuname -nŽ$ (25 Replies)
Discussion started by: scriptor
25 Replies

2. Programming

C++ Beginner Problem With Optget

Hi. I am new to C++. But I am trying to write a basic program that uses the command line. But... $ ./myscript -s 1 -e 8 -c billy -v 1 -o test I get output like this... Starting Length = 1 Ending Length = 8 Name = (null) Output File = (null) Verbose = 1 How come 'Name' and 'Output... (2 Replies)
Discussion started by: cbreiny
2 Replies

3. Shell Programming and Scripting

Export command variable exporting problem

I have a txt file from which i am assiging a value to a variable using the code in script1 script1.sh export f=$(sed -n "/Freq *=/ s/.*= *//p" ${R_path}/output.txt) echo "$f" --------> this works in script2 ( which executes the script1) eval ./script1.sh if && ; then echo... (1 Reply)
Discussion started by: shashi792
1 Replies

4. UNIX for Dummies Questions & Answers

Problem with export command

hello all, I know this is a silly question but i have no answer. I have a shell script temp.ksh export value="mynh" echo $value but when i execute the temp.ksh "mynh" is printed but when i give echo $value in the shell after the program is executed, nothing is printed. ... (3 Replies)
Discussion started by: anijan
3 Replies

5. Shell Programming and Scripting

Unknown problem-beginner

Hi, I have a problem running my script.Here it is: num1="1" num2="2" num3="3" num4="4" num5="5" num6="6" num7="7" echo echo "Type what you wanna do..." echo "1= Start interface 2= Stop interface 3= See your mac" echo "4= Change your mac 5= Hack WEP...... 6= Hack WPA...." echo... (3 Replies)
Discussion started by: hakermania
3 Replies

6. Shell Programming and Scripting

Problem in scheduling an Export of a table

Hi, I am facing a problem while scheduling an export of a table using cron job. I have written a simple export command inside a shell script test.sh like echo started exp schemaname/temp1234 file= /test/d.dmp tables=per_st log= /test/d.log echo ended I tried scheduling it through... (6 Replies)
Discussion started by: beautifulmind
6 Replies

7. Shell Programming and Scripting

problem running shell script (for oracle export) in crontab

Hello Gurus, I've been tasked with solving a problem at my new job and I'm stumped. We've got a script that dynamically builds an oracle export parameter files and then runs export from the shell. it runs fine when using the shell, but will NOT run (fails in one spot everytime) when entered... (1 Reply)
Discussion started by: jsheehan223
1 Replies

8. Solaris

automountd [24] : Mount of /export/home problem

Hi Guys, Thanks for taking the time to read the problem i having outlined below: Before i go into the problem can you please tell me what the following means? a. "dt" stands for and what does it means? Configuration Below: 1x Unix Server 2x Unix Terminals (both systems are... (3 Replies)
Discussion started by: tlee
3 Replies

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

10. Programming

A beginner's problem

Hi, I'm a beginner to study linux program, I know use gcc can link one *.c file to a exe file, but how to link different source files(*.c) to a exe at once. AnyBody know and tell me, thanks. (2 Replies)
Discussion started by: kira_freedom
2 Replies
Login or Register to Ask a Question