LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "echo $path" (https://www.linuxquestions.org/questions/linux-newbie-8/echo-%24path-286247/)

acj 02-04-2005 12:54 PM

"echo $path"
 
Hey guys, I have a Network OS class and I have this lab report. Anyway, one of the questions is: 25. "Explain the output from the command “echo $PATH”. Exactly what is a path?." Where exactly can I find info on this? I ran the command in lab and didn't really understand it. I just want to know what an example output would be and what it means, as the question sounds.

Thanks guys,

acj

michaelk 02-04-2005 01:12 PM

Have you tried googling, reading books etc?

We i.e. LinuxQuestions are not here to do your homework.

reddazz 02-04-2005 01:18 PM

There are lot of Unix/Linux books/material online. You may wanna do a google search or buy a cheap Unix/Linux book.

harken 02-04-2005 01:26 PM

It looks like the book should be an introductive, PC/general software geared one. Because a path is a path in both Windows and Linux, even if the syntax is not exactly the same.

twantrd 02-04-2005 02:36 PM

Just to help you a bit.....PATH is an environment variable. Why don't you run the command and see what it does.

-twantrd

student04 02-04-2005 02:45 PM

Welcome to LQ.org!

As the others have stated, this forum is not to be used as a place to get answers to homework. Google is your friend for that kind of stuff :)

http://linux.about.com/od/linux101/l/blnewbie3_1_4.htm

looky looky i did your homework using google :p and i just broke the rule.. well i'm a nice person, so let this one slide, just between you and me :)

This forum is a vast resource of problems and answers, so the first thing to do would be to do a search on the entire forum. Then google. Then more google. Then post a question. It is preferred that the user has put in some effort to show they are actually wanting to know how to do something or why something does what it does and not just want to know the answer without caring (for homework, as an example). I'm not saying you don't care just that you should search around a little first :)

I hope this was insightful

acj 02-04-2005 04:52 PM

I happen to have a Red Hat Linux Admin guide...but it doesn't really mention that path stuff. I didn't want you to do my homework, or I would have simply asked you to do it for me. I asked for info on what the "echo Path" command does.

I did google it and it came to this website, so it made sense to post here..

Anyway, I appreciate the answers....

student04 02-04-2005 05:54 PM

The command "echo" does what it says. It echoes whatever follows it to the command line. PATH is a variable in the shell, and putting a $ infront of it calls upon it. PATH stores the path directories to commands.

acj 02-04-2005 05:56 PM

Quote:

Originally posted by student04
The command "echo" does what it says. It echoes whatever follows it to the command line. PATH is a variable in the shell, and putting a $ infront of it calls upon it. PATH stores the path directories to commands.
Hey thanks, I pretty much figured that out on that website you gave me. The "echo" part was pretty clear as I've worked with batch files before. Wasn't sure what the whole $PATH part was about though.

I appreciate the replies though....


All times are GMT -5. The time now is 05:21 AM.