more information about echo command
can anyone tell me how does echo command work internally?
can echo command used for purpose other then display message, colour and effects? |
What is the context of this question?
First, look at the man page ("man echo"). I doubt if the command does anything more than what it says there......;) As for the internals, you may need to look at the source code. Quick Google says echo is a built-in, so you'll need the BASH source code. |
echo is also an external command coming from coreutils. The code is derived from the bash source code. Maybe the coreutils' one is more readable, being in a stand-alone C file.
|
ofcourse echo can do other things as i said can change the colour of foreground and background and also can set some effetcs, echo can create a file.
and now i wannna know can echo display the access time of a file, if yes then how? |
Quote:
to do so. Quote:
Quote:
Cheers, Tink |
echo with wc
when i type the following command
echo *|wc the output will be- 1 25 55 here i know what is 25(no of files in current directory), but what are 1 and 55 for? plz tell me if anyone knows.......... waiting for reply... thankyou! |
Quote:
|
First look at the output echo *, then try to figure out what those numbers mean after having read the man page as suggested by pwc101. This is a general advice: carefully read the man pages! Most of the answers are there.
|
echo wid $
thankyou for ur useful suggestion.
now following are some combinations with echo and their outputs, i jst tried randomly, plz tell me what the output are abt........ 1. # echo $- himBH 2. #echo $! 2983 (this is not a PID) 3. #echo $& [1]20662 [root@localhost~]#$ date;pwd sat apr.............. 2009 [1]+Done echo $ /root let me know what's d significance of $ sign? Quote:
|
You can find all the answers here. You should really read a shell programming guide, where you can find all the proper answers to your basic questions. Have a nice time!
|
All times are GMT -5. The time now is 04:43 PM. |