LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Experimenting with shell variables (https://www.linuxquestions.org/questions/linux-newbie-8/experimenting-with-shell-variables-837686/)

michael mc hugh 10-12-2010 09:14 PM

Experimenting with shell variables
 
Please help Explain the following unexpected results
$ whereis date
date: /bin/date …
$ echo $ PATH
. :/user/local/bin:/usr/bin: /bin
$ cat > date
echo “This is my own version of date.”
$ date
Sat May 24 11:45 : 49 PDT 2008

Meson 10-12-2010 09:42 PM

It would help if you told us what is unexpected. But this:
Code:

cat > date
what are you trying to do here? It should probably just hang.

sag47 10-12-2010 09:55 PM

Edit: I gave you the correct answer but then I noticed this post.

I am going to assume that this is also homework and withdraw my answer. You have wasted my time.

grail 10-13-2010 12:36 AM

I am curious ... if we all help you do we get any of the accolades?

Or maybe you just chose a supplementary class and thought this sounded easy and have now found out you know nothing about computers and or linux

sag47 10-13-2010 08:25 AM

Quote:

Originally Posted by grail (Post 4125660)
Or maybe you just chose a supplementary class and thought this sounded easy and have now found out you know nothing about computers and or linux

Even if it is his/her first Linux class it's not hard to RTFM.

dugan 10-13-2010 08:32 AM

Quote:

Originally Posted by grail (Post 4125660)
Or maybe you just chose a supplementary class and thought this sounded easy and have now found out you know nothing about computers and or linux

That, of course, would not be a problem for any student worth helping. It just means he would have to work a little bit harder than some of his peers.


All times are GMT -5. The time now is 06:54 AM.