Path question

Place to discuss Fedora and/or Red Hat

Path question

Postby dishawjp » Mon May 17, 2004 7:20 pm

Hi All,

Hope you're all ready for a really newbie path question. I added ~/bin to my path to hold some shell scripts I've been writing and it has been added to my path, but I do the following, I get this error:
[dishawjp@eunix dishawjp]$ $PATH
bash: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/dishawjp/bin: No such file or directory
[dishawjp@eunix dishawjp]$


All those directories do seem to exist, so why do I get the message? And ~/bin IS in my path since I can execute my shell scripts from any working directory.

It's not a real problem, but the error message is puzzling.

<edit>

I added it to my path by editing my .bash_profile as shown below

[dishawjp@eunix dishawjp]$ more .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME


and to prove that it really does exist:
[dishawjp@eunix dishawjp]$ cd bin
[dishawjp@eunix bin]$ pwd
/home/dishawjp/bin
[dishawjp@eunix bin]$

</edit>

Jim Dishaw
Last edited by dishawjp on Mon May 17, 2004 7:27 pm, edited 2 times in total.
dishawjp
administrator
administrator
 
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY

Postby Void Main » Mon May 17, 2004 7:22 pm

What you *meant* to do was:

$ echo $PATH

or

$ set | grep PATH

or

$ env | grep PATH

:)

By not putting "echo" in front of it bash replaced the variable PATH with what was contained in the variable and tried to execute it as if it were a command. Of course that command doesn't exist.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby dishawjp » Mon May 17, 2004 7:30 pm

Same result with the $echo $PATH

[dishawjp@eunix bin]$ $echo $PATH
bash: /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/dishawjp/bin: No such file or directory
[dishawjp@eunix bin]$
dishawjp
administrator
administrator
 
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY

Postby dishawjp » Mon May 17, 2004 7:33 pm

And NO output from your other suggestions!
[dishawjp@eunix bin]$ $set | grep PATH
[dishawjp@eunix bin]$ $env | grep PATH
[dishawjp@eunix bin]$
dishawjp
administrator
administrator
 
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY

Postby Void Main » Mon May 17, 2004 7:36 pm

No, "echo $PATH" (I was indicating your prompt by the first '$'). Take the first '$' off of every one of your commands. $SOMETHING makes it an environment variable.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA

Postby dishawjp » Mon May 17, 2004 7:41 pm

Sometimes I think that I'm actually learning a bit about Linux and making a bit of progress, and then at times, like tonight I feel like a raw newbie. Yesterday I installed a DVD drive to replace my CD drive and it went so easily I couldn't believe it. Plug it in, set up a symlink and I was playing DVD movies and was able to boot from the drive with no problem.

Earlier this evening I wrote a quick shell script for my court computer to run backups of the most important files to floppy and had it mount and umount the floppy, put it on the desktop as an icon so even my clerk could run it, and here I am with a question/problem that seems so basic that it should be apparant to someone with a month's experience with Linux.

The worst part is that I'm not even drinking !

Maybe that's the problem :-)

Jim
dishawjp
administrator
administrator
 
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY

Postby dishawjp » Mon May 17, 2004 7:43 pm

No, "echo $PATH" (I was indicating your prompt by the first '$'). Take the first '$' off of every one of your commands. $SOMETHING makes it an environment variable.


Works perfectly.

Doh!!!!!

Jim
dishawjp
administrator
administrator
 
Posts: 334
Joined: Thu Jan 23, 2003 9:05 am
Location: Central NY

Postby Void Main » Mon May 17, 2004 8:09 pm

Heh heh, drink a beer, it'll all be better! :) You're just having some DOS flashbacks is all. You'll have them periodically, then they begin to taper off. I haven't had any in several years. Eventually you'll go back to Windows and can't figure the simplest thing out. I spent 3 hours trying to get Tax Cut working! :) Of course that was the first time I had Windows running since last year at tax time. After that little fiasco I can tell you I'll either be doing it by hand on paper next year or over the web (unless TaxCut comes out with a Linux version, yeah right). The only reason I did it this year on Windows is because my wife bought it without my knowledge because she didn't know any better.
User avatar
Void Main
Site Admin
Site Admin
 
Posts: 5705
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA


Return to Fedora/Red Hat

Who is online

Users browsing this forum: No registered users and 0 guests

cron