[juneau-lug] Re: What does . mean?
- From: "James Zuelow" <jamesz@xxxxxxxxxxxxxxxx>
- To: <juneau-lug@xxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2003 15:20:22 -0800
> -----Original Message-----
> From: juneau-lug-bounce@xxxxxxxxxxxxx
> [mailto:juneau-lug-bounce@xxxxxxxxxxxxx] On Behalf Of Myron Davis
> Sent: Thursday, March 27, 2003 4:08 PM
> To: juneau-lug@xxxxxxxxxxxxx
> Subject: [juneau-lug] Re: What does . mean?
>
>
> I always think of it as this:
>
> source = .
>
> . is just a shortcut for typing source in your shell script.
>
> -Myron
I think that is the default bash (Linux) behavior, and that's how I've
always thought about it as well. However on the OpenBSD box I have here
at work, they aren't the same.
csh has 'source' but not '.'
sh has '.' but not 'source'
So a script would run or not depending on whether you were root.
(OpenBSD normal users use sh by default, while root runs csh by
default.)
Example:
$ source testtwo.sh Kevin
sh: source: not found
$ su -
JuneauIMAP# cd /home/james
JuneauIMAP# ./testtwo.sh Kevin
.: Command not found.
And the two commands are subtly different.
Fun stuff!
James
------------------------------------
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the
word unsubscribe in the subject header.
- References:
- [juneau-lug] Re: What does . mean?
- From: Myron Davis
Other related posts:
- » [juneau-lug] What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- » [juneau-lug] Re: What does . mean?
- [juneau-lug] Re: What does . mean?
- From: Myron Davis