2011/7/29 Frédéric Delanoy frederic.delanoy@gmail.com:
+rem for /d %%i in (ba*) do echo %%i>> tmp +rem sort < tmp +rem del tmp
I believe you can also use this syntax [put for instruction in parentheses, add | sort at the end]: (for ... ...) | sort
Btw, it's a horrible hack, but until you'll have a wine sort you can test with (for ... ...) | Z:\usr\bin\sort :)
Octavian
On Fri, Jul 29, 2011 at 22:05, Octavian Voicu octavian.voicu@gmail.com wrote:
2011/7/29 Frédéric Delanoy frederic.delanoy@gmail.com:
+rem for /d %%i in (ba*) do echo %%i>> tmp +rem sort < tmp +rem del tmp
I believe you can also use this syntax [put for instruction in parentheses, add | sort at the end]: (for ... ...) | sort
Yeah, but as usual, when NT4 enters in the dance... you get the picture... doesn't support the same set of arguments as later versions... Sorting is of course a very recent problem ;)
BTW I quickly tested your stuff, but I get a list of "prompt>echo ..."
Btw, it's a horrible hack, but until you'll have a wine sort you can test with (for ... ...) | Z:\usr\bin\sort :)
I'm sure AJ would appreciate that a lot ;)
Frédéric
2011/7/29 Frédéric Delanoy frederic.delanoy@gmail.com:
On Fri, Jul 29, 2011 at 22:05, Octavian Voicu octavian.voicu@gmail.com wrote:
I believe you can also use this syntax [put for instruction in parentheses, add | sort at the end]: (for ... ...) | sort
Yeah, but as usual, when NT4 enters in the dance... you get the picture... doesn't support the same set of arguments as later versions... Sorting is of course a very recent problem ;)
BTW I quickly tested your stuff, but I get a list of "prompt>echo ..."
It works for me, but it does seem it has some problems. It seems cmd doesn't terminate the pipe nicely and sort throws an ugly error after cmd exits. It also kind of freezes after the command if you run it interactive. Cmd doesn't play nicely with non-windows executables, or the piping stuff is not properly implemented.
$ ls bar baz foo x.cmd $ wine cmd /c x.cmd
Z:\home\octav\x>(for /d %i in (*) do echo %i) | Z:\usr\bin\sort foo bar baz $ Z:\usr\bin\sort: read failed: -: Input/output error
Btw, it's a horrible hack, but until you'll have a wine sort you can test with (for ... ...) | Z:\usr\bin\sort :)
I'm sure AJ would appreciate that a lot ;)
I wasn't even remotely suggesting committing such an atrocity! It was just to make sure the commented tests you commit are OK, but I guess you can also use native sort.exe. Come to think of it, if you add Z:\usr\bin to PATH it should work even better...
Octavian