![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Environmental Variable | janemary.a | Shell Programming and Scripting | 2 | 05-15-2007 01:46 AM |
| Setting variable | briskbaby | Shell Programming and Scripting | 1 | 09-14-2006 04:10 PM |
| Set Oracle Environmental Variable !! | uuser | Shell Programming and Scripting | 4 | 02-22-2006 02:46 PM |
| setting PS1 variable | papachi | UNIX for Dummies Questions & Answers | 4 | 05-23-2005 03:08 PM |
| Setting a variable | photh | UNIX for Dummies Questions & Answers | 2 | 01-08-2003 10:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I have problem setting up environmental variables. The idea is to start with main.ksh script that will run setting.ksh, and in side of it I'll set up variables. Please take a look at my code, and help me to find my mistake. Thanks, Mila Main.ksh look like this: Code:
#!/usr/bin/ksh # next line will run settings.ksh from the same directory ./settings.ksh # next few lines will print some variables print "\nPRINT FROM MAIN: " print "username : $myUSER" print "project : $myPROJECT" print "crontab : $myCRONTAB" Code:
#!/usr/bin/ksh # next line will set username export myUSER=mim # next 2 lines will set variables with path to every file or folder export myPROJECT="$HOME/project" export myCRONTAB="$PROJECT/crontab" print "\nPRINT FROM SETTINGS: " print "username : $myUSER" print "project : $myPROJECT" print "crontab : $myCRONTAB" Code:
PRINT FROM SETTINGS: username : mim project : /home/mim/project crontab : /crontab PRINT FROM MAIN: username : project : crontab : |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|