1.

Solve : DOS sort command?

Answer» <html><body><p>Have tried the DOS sort command on both Windows 8 and Windows 8.1 and it doesn't work on either version. Anybody know what's going on?Insufficient information. How are you using it, what were you expecting, and what do you get? (The sort command is available in all versions of Windows, as <a href="https://interviewquestions.tuteehub.com/tag/well-734398" style="font-weight:bold;" target="_blank" title="Click to know more about WELL">WELL</a> as in MS-DOS.)<br/><br/><br/><br/>The most <a href="https://interviewquestions.tuteehub.com/tag/simple-1208262" style="font-weight:bold;" target="_blank" title="Click to know more about SIMPLE">SIMPLE</a> command, i.e. sort filename produces nothing ..... just get a new line. Can't be the file I'm sorting cause the cat command works just fine. A sort command line that includes redirection symbols such as &lt; &gt; or - , produces an error message <a href="https://interviewquestions.tuteehub.com/tag/indicating-7689027" style="font-weight:bold;" target="_blank" title="Click to know more about INDICATING">INDICATING</a> they are unrecognizable. So, i would assume the command is there but the instruction for its <a href="https://interviewquestions.tuteehub.com/tag/use-241643" style="font-weight:bold;" target="_blank" title="Click to know more about USE">USE</a> are just so much barf.Quote from: edhook on November 12, 2013, 01:21:27 PM</p><blockquote>The most simple command, i.e. sort filename produces nothing ..... just get a new line. Can't be the file I'm sorting cause the cat command works just fine. A sort command line that includes redirection symbols such as &lt; &gt; or - , produces an error message indicating they are unrecognizable. So, i would assume the command is there but the instruction for its use are just so much barf.<br/></blockquote><br/>Cat is not a native Windows command. What OS are you running? Have you munged your <a href="https://interviewquestions.tuteehub.com/tag/path-11833" style="font-weight:bold;" target="_blank" title="Click to know more about PATH">PATH</a> environment variable?<br/><br/>What happens (copy and paste the command window text) when you do these things?<br/><br/>On my Windows 8.1:<br/><br/>C:\&gt;echo dog &gt; test.txt<br/><br/>C:\&gt;echo cat &gt;&gt; test.txt<br/><br/>C:\&gt;echo bird &gt;&gt; test.txt<br/><br/>C:\&gt;echo ape &gt;&gt; test.txt<br/><br/>C:\test&gt;type test.txt<br/>dog<br/>cat<br/>bird<br/>ape<br/><br/>C:\&gt;sort test.txt &gt; test2.txt<br/><br/>C:\&gt;type test2.txt<br/>ape<br/>bird<br/>cat<br/>dog<br/><br/><br/>There was an editing error when I pasted the command window. See below.<br/><br/>What happens (copy and paste the command window text) when you do these things?<br/><br/>On my Windows 8.1:<br/><br/>C:\&gt;echo dog &gt; test.txt<br/><br/>C:\&gt;echo cat &gt;&gt; test.txt<br/><br/>C:\&gt;echo bird &gt;&gt; test.txt<br/><br/>C:\&gt;echo ape &gt;&gt; test.txt<br/><br/>C:\&gt;type test.txt<br/>dog<br/>cat<br/>bird<br/>ape<br/><br/>C:\&gt;sort test.txt &gt; test2.txt<br/><br/>C:\&gt;type test2.txt<br/>ape<br/>bird<br/>cat<br/>dog</body></html>


Discussion

No Comment Found