Windows Command Prompt Tutorial
Introduction Internal and External commands Basic Commands Basic file commands Sorting the data Searching patterns in file Comparing files Variables in Windows command prompt Piping Input and Output Redirection View all processes and tasks killing tasks scheduling tasks Network commands System hardware commandsRedirection in windows command prompt
Redirection allows you to send the output to files as well as get input from files. Usually you get the input from standard input stream (console). But you can get the input from files as well. This is called as Input redirection. In below exmple, find command will first read the contents of xyz.txt and then display only those lines containing word “abc”.
find “abc” < xyz.txt
Usually any command sends output to standard output stream (console). But you can redirect the output to files as well. This is called as Output redirection. In below exmple, help command will send the output to commandhelp.txt file instead of console.
help > commandhelp.txt
Note that contents of file “commandhelp.txt” will be overwritten. If you want to append the content to this file, you can use below command.
help >> commandhelp.txt
Web development and Automation testing
solutions delivered!!