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
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" iBot UNIX and Linux RSS News 0 01-04-2008 12:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 10:52 PM
how could i make a program mixed with many "|", "<" and ">" strugglingman High Level Programming 2 04-29-2006 05:11 AM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 01:15 AM
how to request a "read" or "delivered" receipt for mails plelie2 Shell Programming and Scripting 1 08-06-2002 12:26 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2008
Registered User
 

Join Date: Mar 2006
Posts: 3
Thumbs down executing .sh scripts like ". ./"

Sorry maybe that is a trivial question, however we are working at work with
some scripts that we are meant to execute for setting the environment before being able to execute other scripts.

Sometime it is required to execute the script like:

. ./script.sh

Do you know what is the difference between executing like "./" and ". ./"

Thanks in advance.
Reply With Quote
Forum Sponsor
  #2  
Old 05-21-2008
Registered User
 

Join Date: Jan 2007
Posts: 6
Quote:
Originally Posted by pbasil View Post
Sorry maybe that is a trivial question, however we are working at work with
some scripts that we are meant to execute for setting the environment before being able to execute other scripts.

Sometime it is required to execute the script like:

. ./script.sh

Do you know what is the difference between executing like "./" and ". ./"

Thanks in advance.
. ./ will run the script in the current shell, it will not spawn a subshell.
Reply With Quote
  #3  
Old 05-22-2008
Registered User
 

Join Date: Mar 2006
Posts: 3
Quote:
Originally Posted by Actuator View Post
. ./ will run the script in the current shell, it will not spawn a subshell.
What are the consequences? For instance, if I run one script that is setting
the environment like ". ./", I will be able to execute many other scripts & commands later on.
However if I spawn a new subshell, those scripts & commands can not be executed.

Is there any consequences as for user permissons? Sorry, I would like to understand what is going on

Thanks
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:37 AM.


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 Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0