Bash & Ksh | Unix Linux Forums | Shell Programming and Scripting

  Unix/Linux Go Back    

Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Bash & Ksh

Shell Programming and Scripting

Closed Linux or Unix Question    
Thread Tools Search this Thread Display Modes
Old Unix and Linux 08-24-2009
talashil talashil is offline
Registered User
Join Date: Apr 2008
Last Activity: 14 July 2014, 1:32 PM EDT
Posts: 137
Thanks: 4
Thanked 0 Times in 0 Posts
Bash & Ksh

I am using a Linux machine and it's default shell is BASH . I have korn shell script and inside it's setting environment variables. But after execuitng the script those env values are not holding the values . If I run the script outside of that ksh script with source , it's able to hold to values .

what I am trying to do is ...inside the ksh

I tried to like this ..


and if I run it in debug mode , it's still showing it's executing it as
. ( default korn shell behaviour) .

any ideas how to do this ?

Sponsored Links
Old Unix and Linux 08-24-2009
Smiling Dragon's Unix or Linux Image
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
Join Date: Nov 2007
Last Activity: 2 February 2015, 2:55 PM EST
Location: New Zealand
Posts: 1,048
Thanks: 21
Thanked 26 Times in 25 Posts
A script isn't going to modify the environment of the parent process - that would make no sense... Is that what you are trying to do?

If so, you need to call it without forking (ie via the . like you have above).
You can certainly do this inside a script without problems - it's a very common way of putting configuration items used by several scripts in a central file.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bash preferred or ksh with bash features mrwatkin UNIX for Dummies Questions & Answers 2 06-17-2009 01:19 PM
how to make your bash script run on a machine with csh and bash npatwardhan Shell Programming and Scripting 3 11-19-2008 03:17 AM
bash and ksh: variable lost in loop in bash? estienne Shell Programming and Scripting 2 08-25-2008 02:09 PM
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 12:25 PM
Why generate "ash and bash" different output for same bash script? s. murat Shell Programming and Scripting 0 05-26-2008 07:19 AM

All times are GMT -4. The time now is 06:16 AM.