The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sourcing the .bashrc Nusy UNIX for Dummies Questions & Answers 3 05-27-2008 06:23 PM
word too long..problem while sourcing .cshrc mobydick UNIX for Dummies Questions & Answers 1 05-08-2008 10:11 PM
Maintain full path of a script in a var when sourcing it from a different script mrbluegreen Shell Programming and Scripting 4 03-19-2008 10:31 PM
Problem starting a script from a 'main'-script Rakker UNIX for Dummies Questions & Answers 3 06-28-2005 09:12 AM
arguments in sourcing file Nathe UNIX for Dummies Questions & Answers 4 08-23-2004 07:53 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-20-2007
rakeshou rakeshou is offline
Registered User
  
 

Join Date: May 2007
Posts: 75
Smile script sourcing problem (ksh)

I have a script "abc.sh" in /tmp which has exit 0 as its last line

when I run this script from /tmp/xyz/def.sh script as


Code:
. ../abc.sh

then the script executes but the control doesn't return to def.sh script for subsequent commands in def.sh

but if I invoke the abc.sh from inside the def.sh as


Code:
../abc.sh

then the control

Also

if the def.sh script is in /tmp directory and I invoke the abc.sh script from def.sh script as


Code:
. ./abc.sh

then the control returns back to def.sh with out problems

isn't it strange?

Quote:
I mean . ./abc.sh works but . ../abc.sh doesn't
I am trying to understand the script sourcing and this is breaking my head.

Please help

Thank you
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0