Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Piotr Hosowicz <adresat.nieprawidlowski@op.pl>
Subject: Re: some queris on .profile file
Date: Sun, 18 Jun 2006 00:07:02 +0200	[thread overview]
Message-ID: <e71uhc$4gr$1@nemesis.news.tpi.pl> (raw)
In-Reply-To: <1150576687.026459.179060@u72g2000cwu.googlegroups.com>

mehaboob@gmail.com wrote:

> if we apply the  rules source some-script.sh then we get
> source <filename>  i.e
> source .profile
> 
> If I have execute .profile then the command would be
> ./<filename>  i.e
> ./.profile
> 
> But my confusion why do we have source and execute
> source execute the file  i.e
> souce ./<filename>    i.e
> . ./.profile

Once again - source-inclusion or dot-inclusion are the same and happen 
in the same shell, that you are running and issuing the source-include 
or dot-include command.

When some-script.sh is executable and you do :

./some-script.sh

... then execution happens in a separate shell, unlike in 
source-inclusion or dot-inclusion. That's why I mentioned exit command. 
Frequently people keep asking why their source/dot included scripts end 
prematurely. Usually this happens when there's an exit in included 
(sourced) file.

-- 
No signature found.


  reply	other threads:[~2006-06-17 22:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-15 10:15 some queris on .profile file mehaboob
2006-06-15 12:37 ` Wim Cossement
2006-06-15 19:55 ` Adam Price
2006-06-16  9:15   ` mehaboob
2006-06-16 15:27     ` Wim Cossement
2006-06-17 18:21       ` mehaboob
2006-06-17 18:56         ` Piotr Hosowicz
2006-06-17 20:38           ` mehaboob
2006-06-17 22:07             ` Piotr Hosowicz [this message]
2006-06-18  1:21             ` Bob Harris
2006-06-18 15:33               ` mehaboob
2006-06-18 17:57                 ` Bob Harris
2006-06-18 21:24                   ` mehaboob
2006-06-19  0:57                     ` Bob Harris
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox