

InterviewSolution
Saved Bookmarks
1. |
Solve : Kudos for DOS Forum? |
Answer» <html><body><p>Quote</p><blockquote> I tried it, and it produced the error message " 'typ' is not recognized as an internal or external command, operable program or batch file. ", but it still executed the command to completion!</blockquote> Only incidentally.<br/><br/> Code: <a>[Select]</a>typ nul &<a href="https://interviewquestions.tuteehub.com/tag/gt-249387" style="font-weight:bold;" target="_blank" title="Click to know more about GT">GT</a>; somefile.txtSays to execute the command "typ nul" and redirect the standard output to "somefile.txt". since typ is not a command, the command fails, the message prints to the standard error stream, and then the standard output is redirected to the file, which in this case means nothing gets redirected, which incidentally is what the original command was intended to do. The only functional difference between:<br/><br/> Code: <a>[Select]</a>type nul > somefile.txt<br/>and <br/> Code: <a>[Select]</a>geeble gobble > somefile.txt<br/><br/>is that the latter will produce an error message in addition to redirecting nothing to the file.Thanks for the <a href="https://interviewquestions.tuteehub.com/tag/clarification-917667" style="font-weight:bold;" target="_blank" title="Click to know more about CLARIFICATION">CLARIFICATION</a>. I see it now. Two separate results of any (is it accurate to say any?) command. It's like this:<br/> Code: <a>[Select]</a>geebles gobble but they don't gob down > somefile.txt Quote from: stew2652 on November <a href="https://interviewquestions.tuteehub.com/tag/19-241909" style="font-weight:bold;" target="_blank" title="Click to know more about 19">19</a>, 2014, 06:57:56 AM<blockquote>Interesting. I did not execute this <a href="https://interviewquestions.tuteehub.com/tag/particular-1147539" style="font-weight:bold;" target="_blank" title="Click to know more about PARTICULAR">PARTICULAR</a> command in a batch. I issued it directly at the command <a href="https://interviewquestions.tuteehub.com/tag/line-239358" style="font-weight:bold;" target="_blank" title="Click to know more about LINE">LINE</a>, and it produced the error message I stated.<br/></blockquote> <br/>No matter where you issued the command, it still failed.<br/><br/> Quote<blockquote>but it still executed the command to completion!</blockquote> <br/>Just to clarify, this is the bit that it didn't do.<br/><br/></body></html> | |