1

Can someone please shed some light on an equivalent method of executing something like "cat file1 -" in Linux ? What I want to do is to give control to the keyboard stream (which is "-" in linux) once the content of file1 is displayed.

XYZ
  • 310
  • 2
  • 12
  • 1
    Perhaps you might find your solution here? https://stackoverflow.com/questions/60244/is-there-replacement-for-cat-on-windows I'm not entirely sure if the "-" suffix is also part of the "type" or "echo" behaviour, though – Craig May 26 '21 at 01:02

2 Answers2

2

You can't achieve that in Windows using a single command, however you can use 2 commands on a single line:

type file.txt && type CON

This will print the contents of "file.txt" and if that command was successful it will give control to the keyboard stream (using a special keyword called CON).

Tip: To stop, hit Ctrl + C or Ctrl + Z and Enter.

Remember to replace "file.txt" with your file!

Sources:

Sebastian
  • 142
  • 2
  • 7
0

type command


c:\type myfile.txt

reference https://superuser.com/questions/434870/what-is-the-windows-equivalent-of-the-unix-command-cat