$HOME vs $Home was: WARNING TO CROOMBE, READ THIS IMMEDIATELY !!! Re: [oclug] Strange Fedora problem

Brad Barnett lists at l8r.net
Fri Aug 4 13:08:48 EDT 2006


On Fri, 04 Aug 2006 12:43:11 -0400
Jamon Camisso <jamonation at gmail.com> wrote:

> Stephen Gregory wrote:
> > On Fri, Aug 04, 2006 at 10:54:45AM -0400, Jamon Camisso wrote:
> > 
> >> why does echo $HOME return my home dir whereas echo $Home 
> >> returns nothing, a blank line.
> <snip>
> > If you are in your home directory that will show a listing of your
> > home directory.
> > 
> > try this:
> > cd /
> > ls -al $HOME
> > ls -al $Home
> 
> I did that (before even poting my message to Croombe to check) and both
> point to home. 

From what you've said below, it does not look like you typed the 'cd /'
before executing the above two ls commands.  It really doesn't.

I think that there is little value for this list, or for you either, if we
don't start getting into pasted outputs from your commands.  Brian's
statement about PWD is a good one.

So:

cd /
pwd
ls -al $HOME
ls -al $Home

Don't abbreviate anything.  Don't omit anything.

> I've checked it now on 3 different systems: Ubuntu, Debian, and Gentoo
> and they all return the same result. My message in response to Brad's
> message made that clear I think. Case sensitivity and ~ and such I
> understand. What I'm not clear on are two things:
> 
> 1) they return the same output when echoed even though one is apparently
> uninitialized:

No, they don't though.  Please paste the output from _that_ as well.

> 
> 2) the trailing slash makes all the difference here. The first $HOME/ is
>  as it should be. The second points to / (root). Now why in one instance
> would it point to /home/user and in the second / ? I understand that one
> is empty, but when 3 other commands return their expected output and one
> doesn't, which is to be trusted?
> 
> ls -al $HOME
> ls -al $Home
> 
> vs.
> 
> ls -al $HOME/
> ls -al $Home/
> 
> The trailing slash is the entirety of the issue for me anyways. Had I
> not included it (mistakenly) in my message to Croombe, there would be no
> problem here.
> 
> Finally, I'll pose the question again: Is there a comprehensive way to
> list all initialized bash variables on a system? A table or some such
> thing. At this point I'm sticking with tab completion since it is what I
> learned, is more than fast enough, and is always correct.

A previous message mentioned that specifically.  This leads me to wonder
if you are reading these messages?  Stephen Gregory's message will
enlighten you.



More information about the OCLUG mailing list