Re: sort(1)



NDog пишет:
I am wondering if anyone knows an easy way to sort text from a file to
an output file, sorting by the first 3 characters on a line eg 1.2, in
4DOS and not using some other util like sort or gsar. If it is not
easy or possible I won't worry too much, however I am totally stumped
here and dont even know where to approach this. I am worried if i load
an entire file into memory it will take too much memory and even then
i dont know how to sort it from there entirely with 4dos.

In a sense, the 4DOS philosophy is the opposite to the Unix philosophy - it is an "all in one" tool and not a large set of small tools as Unix. But, it cannot do everything and could never beat the good old Unix text processing tools. The "sort(1)" has the option you request and much more. Its DOS port is at ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/txt20b.zip (1 MB) - see its info page at http://www.manpagez.com/info/coreutils/coreutils_37.php (I hope you can use it and are not really limited to 4DOS because even the Sun (4DOS) can't shine everywhere: no single program can really do everything!)

Regards,
Lucho
.



Relevant Pages