1.

Solve : DOS sort command?

Answer»

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 WELL as in MS-DOS.)



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 < > 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.Quote from: edhook on November 12, 2013, 01:21:27 PM

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 < > 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.

Cat is not a native Windows command. What OS are you running? Have you munged your PATH environment variable?

What happens (copy and paste the command window text) when you do these things?

On my Windows 8.1:

C:\>echo dog > test.txt

C:\>echo cat >> test.txt

C:\>echo bird >> test.txt

C:\>echo ape >> test.txt

C:\test>type test.txt
dog
cat
bird
ape

C:\>sort test.txt > test2.txt

C:\>type test2.txt
ape
bird
cat
dog


There was an editing error when I pasted the command window. See below.

What happens (copy and paste the command window text) when you do these things?

On my Windows 8.1:

C:\>echo dog > test.txt

C:\>echo cat >> test.txt

C:\>echo bird >> test.txt

C:\>echo ape >> test.txt

C:\>type test.txt
dog
cat
bird
ape

C:\>sort test.txt > test2.txt

C:\>type test2.txt
ape
bird
cat
dog


Discussion

No Comment Found