I am using this batch command to save ping output to a text file,
ping 10.226.2.10 -n 10 >>ping_ip.txt
But when i saved the above command in a batch file and trying to run it, in command prompt window my command gets converted to the below command...
ping 10.226.2.10 -n 10 1>>ping_ip.txt
you can see there is extra 1 in 1>>
in the second command, i don't know how it came.. somebody please give your valuable opinion on the same
This is just the normal behaviour.
In batch files you have some input/output streams:
Your >>
operator implicitly redirects the standard output stream, that is, it is redirecting the stream number 1, and the cmd
parser converts the command
command >> output
into
command 1>> output
showing the explicit command executed based in an implicit request
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With