dot space slash - what does it do?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dot space slash - what does it do?

Jody Baudoin-2
What does this do?
Note :  a dot, a space, and a path....

. /usr/local/someFile

Thanks,
Jody
_______________________________________________
slug mailing list
[hidden email]
https://www.suncoastlug.org/mailman/listinfo/slug
Reply | Threaded
Open this post in threaded view
|

Re: dot space slash - what does it do?

dylan
Administrator
the . is the same as the "source" shell builtin function. It causes the
current shell to evaluate the file specified (as if it were pasted into the
shell).


On Wed, Aug 14, 2013 at 11:40 AM, Jody Baudoin <
[hidden email]> wrote:

> What does this do?
> Note :  a dot, a space, and a path....
>
> . /usr/local/someFile
>
> Thanks,
> Jody
> ______________________________**_________________
> slug mailing list
> [hidden email]
> https://www.suncoastlug.org/**mailman/listinfo/slug<https://www.suncoastlug.org/mailman/listinfo/slug>
>
_______________________________________________
slug mailing list
[hidden email]
https://www.suncoastlug.org/mailman/listinfo/slug
Reply | Threaded
Open this post in threaded view
|

Re: dot space slash - what does it do?

Eben King
In reply to this post by Jody Baudoin-2
On Wed, 14 Aug 2013, Jody Baudoin wrote:

> What does this do?
> Note :  a dot, a space, and a path....
>
> . /usr/local/someFile

. is a shortcut for the keyword "source", which executes a textfile in the
current environment.  I believe any hash-bang line is ignored, along with
every other line past a hash.  It's used for modifying the current
environment, by adding/changing aliases or functions or variable
definitions.  That sort of thing.

--
-eben    [hidden email]    royalty.mine.nu:81
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al
_______________________________________________
slug mailing list
[hidden email]
https://www.suncoastlug.org/mailman/listinfo/slug