Now I want to sort this text file but not after the 3rd column resp. 3rd character in a line
but after the 3rd token. Sample:
original:
wwwwwww ddd ddddd dddd dddd
xxxxxxxxx cc cc ccccc
yyyy bbb bbbbbbbbbbbbbbbb
zzz aaaaaa aaaa aa a aaa
should be after sort:
zzz aaaaaa aaaa aa a aaa
yyyy bbb bbbbbbbbbbbbbbbb
xxxxxxxxx cc cc ccccc
wwwwwww ddd ddddd dddd dddd
How can I do this within a MSDOS batch script?
Dennis
> original:
> How can I do this within an MS-DOS batch script?
> Dennis
*** The DOS "SORT" command sorts by character position, but some
third-part SORT commands may allow token sorting. Look here for other
SORT commands:
http://www.chebucto.ca/~ak621/DOS/Websites.html
That aside, XSET can recognise and manipulate tokens via its "/WORD"
and "/SEPARATOR" features regardless of what character is used to separate
tokens. However, I have never written a batch file that sorts by them.
Finally, the 4DOS "FOR" command can parse text via its `/F' switch.
Again, I have never used it to sort output via tokens. Both 4DOS and XSET
links are in the previous URL.
--------
Sorry I can't be of more precise help; I am just getting back into
newsgroups after a five-month stretch of an almost 7-day-a-week work
season. Post here again and I may be able to take some time to whip up a
batch file - I like the idea of a such a task.
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
script:
>… I am just getting back into newsgroups
>after a five-month stretch …
Welcome back Richard!
salaam,
dowcom
To e-mail me, add the character zero to "dowcom". i.e.:
dowcom(zero)(at)webtv(dot)net.
The fact that 'conventional wisdom' is indeed 'conventional',
does not, in any way, imply that it is wise.
> script:
> >=85 I am just getting back into newsgroups
> >after a five-month stretch =85
> Welcome back Richard!
>
> dowcom
*** Thanks. It went crazy this year, but I was glad for all the work.
Here are photos of a few of the events:
http://AIEL.chebucto.biz/Gallery/
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/