LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   question (https://www.linuxquestions.org/questions/linux-newbie-8/question-850568/)

serzah 12-16-2010 12:22 AM

question
 
what is the difference between

$echo cat
$cat echo

can someone help me

paulsm4 12-16-2010 12:28 AM

"echo" and "cat" are two commands.

Two completely different commands, which do two entirely different things.

Quote:

man echo

NAME
echo - display a line of text

SYNOPSIS
echo [OPTION]... [STRING]...
Quote:

NAME
cat - concatenate files and print on the standard output

SYNOPSIS
cat [OPTION] [FILE]...

DESCRIPTION
Concatenate FILE(s), or standard input, to standard output.
EXAMPLES:
Code:

echo cat
cat

cat echo
cat: echo: No such file or directory

The first example just "echoed back" what I typed - the letters "c", "a" and "t"

The second example tried to print the contents of the file "echo". But there was no such file "echo" - hence the error.

'Hope that helps


All times are GMT -5. The time now is 04:24 PM.