LINUX CLASSES - LINUX COMMANDS
What Does The Echo Command Do?
Is There an echo in Here?
The echo command displays a message on the screen and is primarily useful for programmers writing shell scripts (see "Linux Programming"). But anyone can use echo to show the value of environment variables. The echo command displays a message on the screen and is primarily useful for programmers writing shell scripts (see
"Linux Programming"). But anyone can use echo to show the value of environment variables. Here are some examples:
echo My name is $USER - Home directory=$HOME.
My name is hermie - Home directory=/home/hermie.
The echo command is very similar to the DOS command of the same name, except that the DOS echo command cannot display environment variables--it just displays a message.
Previous Lesson: Date and Time
Next Lesson: Spell Checking
[ RETURN TO INDEX ]
Comments - most recent first
(Please feel free to answer questions posted by others!)
(25 Feb 2013, 18:00
i want to use my computer(linux) , by programe made by me, in a file , and then i want to run that code, then i want that computer work according that code , so what should i do ?, i want to learn that,
have u any tutorial about it ??? plzzz send me on my email
(20 Dec 2012, 06:01
echo * <-- list files and dir names (unformatted)
echo /* <-- idem root directory
echo */ <-- idem only subdir names
echo ../* <--
idem parent directory
echo $x <-- list file an dir names
echo "$x" <-- prints *
x='/* this is a comment */'
what happen when:
I get erratic output
/* this is a comment */
[list of root directory file names] this is a comment [list of subdirs]
And a problem when:
sed -n /$x/p file
(05 Nov 2012, 21:35
Hi,I have a problem, really I want to write implementation of 'echo' command with c?
please help me,Thankes
(26 Oct 2012, 11:35
hi, i had the urge to point out the obvious, since no one did:
The first paragraph (/linux-echo-command.html) contained redundant information in form of ...repetitions!
(06 Sep 2012, 17:28
Hahah, My laptop crashed when I was browsing lowfatlinux.com last time I was here. And for the past 2 months I have been looking for this wephorum, so thankful I located it once again! :D
(22 Jan 2012, 12:31
can i kmow what work the command echo -n can do???
(04 Jan 2012, 03:03
If u press a keyboard, 1 code is created by system & it can realize which key is pressed. In reality one person presses 1 key another place & I can realize its key with finding the code by remote terminal.
Can u help me????
(04 Dec 2011, 03:04
If you want to add a line to txt file you can use echo
I utilized ..it worked
(10 Sep 2011, 10:14
Hi there, I believe your website may very well be possessing browser compatibility concerns. When I appear at your site in Safari, it seems great but when opening in Net Explorer, it's some overlapping. I just needed to provide you with a swift heads up! Other then that, wonderful weblog!
(08 Sep 2011, 09:30
Your first 2 sentences are duplicated on this page.
(10 Aug 2011, 07:26
i thought you typed the first sentence by mistake
(01 Jun 2011, 04:36
how many charactor i can write
(31 Jan 2011, 05:49
yes how simple.......echo
(24 Jan 2011, 07:29
i like the web site
(27 Dec 2010, 10:59
This is very graet article about vi editor.thanks so much.
(01 Dec 2010, 20:42
The DOS echo does display environment variables if you use %VAR_NAME%, as in: %PATH%. In unix/linux use the $, as in $PATH.
C:\>echo windir = %windir%
windir = C:\WINDOWS
(07 Oct 2010, 09:59
Yes, that was pretty funny. I don't even remember doing it! Yes, that was pretty funny. I don't even remember doing it!
(06 Oct 2010, 11:44
I thought that was pretty hilarious how you echoed that first sentence on the subject of the echo command.
(04 Jul 2010, 23:21
details about asp.net with sql database and its screen shots
(03 Mar 2010, 23:29
how to blink a text using echo.I tried
echo -e "\033[5m hii"
bt didnt worked
I welcome your comments. However... I am puzzled by many people who say "Please send me the Linux tutorial." This website *is* your Linux Tutorial! Read everything here, learn all you can, ask questions if you like. But
don't ask me to send what you already have. :-)
NO SPAM! If you post garbage, it will be deleted, and you will be banned.
Copyright © by Bob Rankin
All rights reserved - Redistribution is allowed only with permission.