The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
when executing .sh script in telnet error "script not found" smiley Shell Programming and Scripting 1 04-22-2008 10:01 AM
[AIX] executing script piooooter UNIX for Dummies Questions & Answers 1 05-25-2006 09:53 PM
executing script big123456 Shell Programming and Scripting 1 06-03-2005 04:32 AM
RSH use for executing a script frustrated1 Shell Programming and Scripting 6 10-02-2003 05:24 AM
Executing ksh script from cgi hodges Shell Programming and Scripting 1 05-27-2003 07:57 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-19-2007
Registered User
 

Join Date: Aug 2007
Posts: 49
Question script executing . ./.script.sh

what is the difference between executing the script .script.sh and . ./script.sh.

Example : . ./.bash_profile


And also can any one tel me what do source command do?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-19-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
.script.sh

would try and find a program called ".script.sh" on the path and run them in a child process.

. script.sh

would basically interpret the script.sh commands inline

./script.sh

would try and find a program called "script.sh" in the current directory and run them in a child process.

source is an alias for .
Reply With Quote
  #3 (permalink)  
Old 09-19-2007
Registered User
 

Join Date: Aug 2007
Posts: 49
Question

So can i run . ./.bash_profile from any of the location? Or do I need to be in the same directory?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:11 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0