Unix pipes - echo and cat
I am having trouble with the following command on the Unix Bash Shell:
echo "This is some text" | cat dashes - dashes
"dash" is a file containing a line of text: "---------------------------------"
From my understanding, the left stout stream command becomes the correct stdin stream commands. I expected to be printed:
This is some text
---------------------------------
But what was actually printed:
---------------------------------
This is some text
---------------------------------
I have two questions:
-
What happens when the echoes enter the cat to draw this conclusion?
-
How does the dash at the end of a command work?
+3
source to share