Tuesday, June 21, 2011

Printing - echo and cat

The echo command simply sends output to the screen.


[ray@domain ~]$ echo "Hello, World!"
Hello, wold!


The cat command opens a file and writes its content to the screen. Keep in mind that certain characters are reserved for special use on the command line. You´ll often want to use these characters in command options or in filenames. To use theses characters, you must escape them, prefix them with a backslash caracter, like so

[ray@domain ~]$ cat Hello\ World.txt
Hello, wold!



No comments:

Post a Comment