Talk:TYPE (DOS command)
Latest comment: 14 years ago by Cparker in topic Important difference between Unix cat and DOS type
This article is rated Stub-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||
|
Important difference between Unix cat and DOS type
editIf you specify more than one file name with cat, then the contents of each file will be joined with a newline:
$ cat foo foo $ cat bar bar $ cat foo bar foo bar $
If you specify more than one file name with type, then the contents of each file are preceded with a newline, the file name, and two more newlines (the additional lines of whitespace you see before the prompts below are not from type's output). Then each of these is joined with a newline, which is why you see a blank line between "foo" and "bar.txt":
C:\>type foo.txt foo C:\>type bar.txt bar C:\>type foo.txt bar.txt foo.txt foo bar.txt bar C:\>