The first time I saw NUL used in this way
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
DigestI
View 29,426 Replies 57
Originally posted by chenall at 2006-3-26 14:38:
You can't use handle 3 simultaneously if it's specified twice. Try changing the second one to echo. 1>nul 4>nul and see.
Indeed, it works.
To restore, use echo 2>con 5>con respectively, echo 1>con 6>con. If you only want to...
Because the temporary location is selected by the system and users cannot control it, so the value cannot be determined
cnd 2>nul 3>nul changes the output, and it can be restored with cnd 2>&3 4>&3", the number 4 is the result of the guess, which is based on the relatively clear situation of handle usage just when entering cmd.
If handle redirection is repeatedly used in a batch script, it is difficult to judge the situation of the handle space. So I said "the system decides, and users can hardly control".
I agree with your concept of "unused handles", and the test has confirmed this concept. In fact, I feel that clear concepts are crucial; otherwise, it will cause great harm. Just like the ambiguous explanations in Windows help, which will only make people more confused.