The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 01:01 PM
[AIX] executing script piooooter UNIX for Dummies Questions & Answers 1 05-26-2006 12:53 AM
executing script big123456 Shell Programming and Scripting 1 06-03-2005 07:32 AM
RSH use for executing a script frustrated1 Shell Programming and Scripting 6 10-02-2003 08:24 AM
Executing ksh script from cgi hodges Shell Programming and Scripting 1 05-27-2003 10:57 AM

Closed Thread
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
  #1 (permalink)  
Old 09-19-2007
praveen_b744 praveen_b744 is offline
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?
  #2 (permalink)  
Old 09-19-2007
porter porter is offline Forum Advisor  
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 .
  #3 (permalink)  
Old 09-19-2007
praveen_b744 praveen_b744 is offline
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?
Closed Thread

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 05:16 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