Answer Posted / tubecharger
In unix, echo is used to display whatever is following it
onto the terminal or screen. Special characters get handled
differently and are processed by the shell with their
special meaning. If special characters are to be displayed
using echo, then they must be preceded by a back-slash or
put in quotes or double quotes or a combination of all of
these depending on what you are trying to do.
For example:
example 1:
echo hello world
displays
hello world
example 2:
echo "Hello there!"
displays
Hello there!
(and here the special character ! is quoted so that it's
special meaning is ignored.)
example 3:
set message = "this is a message."
echo $message
displays
this is a message.
echo on - by itself does not turn on and off echoing of
commands to the terminal. echo on simply types "on" at the
terminal.
echo string >> filename may work on some systems but the
conventional way of doing this is using the cat command:
cat "hello world" > filename
Refer to the man page on csh, bash or sh for more details on
the echo command.
Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
Is command prompt unix?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.
What is a bash command?
Which command is used to create a directory?
What is the difference between grep and grep?
What are some command words?
Write a command to display a file’s contents in various formats?
How do I use nslookup?
How do I use grep to search for a file?
What is grep command in unix with examples?
What is rmdir command?
how to sort the content of the file based on numeric values
What is ‘ps’ command for?
How do I run a whois command?
Is ‘du’ a command? If so, what is its use?