From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Thread: fa528,1fcb2333482dcee6 X-Google-Attributes: gidfa528,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!r2g2000cwb.googlegroups.com!not-for-mail From: "mehaboob@gmail.com" Newsgroups: comp.unix.tru64 Subject: Re: some queris on .profile file Date: 18 Jun 2006 08:33:43 -0700 Organization: http://groups.google.com Message-ID: <1150644822.914802.41470@r2g2000cwb.googlegroups.com> References: <1150366558.414200.141250@p79g2000cwp.googlegroups.com> <1150449352.642566.101720@c74g2000cwc.googlegroups.com> <1150568477.954146.133060@f6g2000cwb.googlegroups.com> <1150576687.026459.179060@u72g2000cwu.googlegroups.com> NNTP-Posting-Host: 62.253.96.45 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1150644827 11340 127.0.0.1 (18 Jun 2006 15:33:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 18 Jun 2006 15:33:47 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: r2g2000cwb.googlegroups.com; posting-host=62.253.96.45; posting-account=t-Pqjw0AAAD1wih1fRxEyfEQBPguK2ZN Xref: g2news2.google.com comp.unix.tru64:433 Bob Harris wrote: > In article > <1150576687.026459.179060@u72g2000cwu.googlegroups.com>, > "mehaboob@gmail.com" wrote: > > > Piotr Hosowicz wrote: > > > > > mehaboob@gmail.com wrote: > > > > > > > I did understand about your explanation for ./.profile > > > > But what is the initail dot and space for? > > > > i.e . ./.profile > > > > > > Hi Mehaboob, > > > > > > In some shells there is a command named source, if you do : > > > > > > source some-script.sh > > > > > > ... then some-script.sh is sourced into current running shell, meaning > > > "including" the script some-script.sh. There are some gotchas, like f= or > > > example if you have : > > > > > > exit > > > > > > .. in some-script.sh then it will exit the whole calling shell and not > > > terminate "sourceing" some-script.sh. > > > > > > Single dot is equivalent to source'ing some script, so above is > > > equivalent to : > > > > > > . some-script.sh > > > > > > > > > -- > > > No signature found. > > > > Thanks for taking time to explain. > > I have some more confusion > > > > > > if we apply the rules source some-script.sh then we get > > source i.e > > source .profile > > > > If I have execute .profile then the command would be > > ./ i.e > > ./.profile > > > > But my confusion why do we have source and execute > > source execute the file i.e > > souce ./ i.e > > . ./.profile > > > > > > Regards, > > Mehaboob > > Sourcing a script (eg: . ./.profile) will allow tht script to set > local variables, environment variables, shell options, aliases, > create functions, etc... for your running shell. In this case it > would be your interactive shell. So it can alter your current > shell environment. > > Invoking an executable shell (eg: ./.profile) will run that shell > script in a subprocess. All variables, environment variables, > shell options, aliases, and functions created or modified will be > lost as soon as that script finishes. > > Think of it as going to dinner with a friend, and your buying. > You both consuem food, but when your friend leaves, the calories > he/she consumed, leaves with them. But the calories you ate get > to go home with your. Bon App=E9tit :-) > > Bob Harris Hi, Thanks for the explanation.Now this brings up some queries in my mind.... 1)What are environment variables?...Are these the only variables that are set in .profile file? 2)Are the environment available for all the script intiated from the shell? 3)Is it possible that the .profile does not get sourced when I login ? 4)When I run the command env,variables listed...Are these the variables that are set using .profile ,if not where are these variables being set? Mehaboob