![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Variable file name script | Vish_chem | UNIX for Dummies Questions & Answers | 2 | 05-21-2008 11:00 PM |
| Value of a variable from another script | big123456 | Shell Programming and Scripting | 2 | 04-24-2008 08:58 AM |
| Pass script variable value to AWK | BearCheese | Shell Programming and Scripting | 1 | 06-28-2007 02:02 AM |
| Check if variable is set in script | frustrated1 | Shell Programming and Scripting | 3 | 08-18-2005 11:22 PM |
| Trying to use 'compound variable' in a script | neemic | Shell Programming and Scripting | 3 | 01-16-2004 04:07 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
getting variable from script
Hi there
I'm absolutly new in this and i'm very confused allready. I need to run a script from .profile , wich has no problem and when i return to .profile (this script runs from the middle of the .profile), i need to get a variable set on the scipt file. I have puted this line in the end of the script : export LOGT and this is the value i need to get when returning to .profile. How can i do this? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Your script is a seperate process launched by your .profile. When it exits, its environment goes away, including the exported variable. A child process cannot change the environment of its parent.
Try this... instead of script do this . script A dot script runs in the same process. |
||||
| Google The UNIX and Linux Forums |