O Plameras wrote:
In the context of $cat 1>m1, the output is specified
std.out == 1, but at the same time is re-directed to filename "m1'.
In the same context, the input is not specified, so the
default is used which is "std.input" == 0. That's why
$cat 1>m1
means concatenate "std.input" into filename "m1".
I understand what both you and Jamie are saying. cat concatenates
stdin(0) because a file wasn't specified, in the same way I normally use
$ cat >file to create text files. I was emphasising on what 1>m1
actually meant, so there is still nothing wrong with what I said:
"1 is actually stdout as mentioned in my previous message. You're
redirecting to m1 what cat is outputting to the screen and not what your
entering to the keyboard"
which is what actually happens _in between_ keyboard entry and writing
to the file m1:
1. cat concatenates stdin(0)
2. cat echoes what it read from stdin to stdout(1)
3. bash reads from stdout(1)
4. bash redirects what it read from stdout to file m1
Carlo
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html