- 1 year ago
Windows equivalent for "cat -"
Comment
1 / 1
In Windows, the equivalent of the Unix command cat -
can be achieved using the type
command with the input redirection operator (<
). Here's the equivalent Windows command:
batchtype con
The type con
command reads input from the console (stdin) and outputs it to the console (stdout). When you run this command, you can type or paste text into the console, and it will be displayed as output.
Here's an example usage:
- Open a command prompt in Windows.
- Type
type con
and press Enter. - Start typing or paste the desired text into the console.
- Press Ctrl + Z followed by Enter to indicate the end of input.
- The input text will be displayed as output in the console.
Note that the type con
command does not create or read files like the cat
command in Unix. It only reads input from the console and outputs it to the console.