What would be the best way to chop long lines of output (and do some horizontal scrolling perhaps, but I'm not holding my breath) on Windows, using Windows command-line tools like more
. I want to simulate the less -S
pager.
1 Answer
The good news is that you can use most or all of the Unix-like tools on a Windows machine.
See the GNU page for information and download links.
That is the DOS command-line tools you need!
I'm not sure where I installed mine from, as they are bundled with other things like git for Windows. I will try and add a better link but you should be able to find one if the GNU page doesn't have a direct Windows download.
EDIT It seems the commands are also now included in the Windows Subsystem for Linux (WSL) which is a Windows component you can enable. There's a page here with info about how to enable WSL if you want to do it that way.
EDIT 2 The above assumes a Windows environment, but that may be an incorrect assumption. If you want to do this literally under DOS, there were thinks like the MKS Toollkit that did the same thing, which you might want to try and get hold of.
-
The bad news is that those are all Win32 programs and won't run on MS-DOS... Nov 2, 2020 at 13:39
-
1@user1686 True, but I'm assuming the OP means under Windows--but I may be quite wrong. We will see.– Reg EditNov 2, 2020 at 13:42
-
Regarding the Git installer, I think it bundles the "msys" distribution (which is somehow related to MinGW compiler suite). Nov 2, 2020 at 15:32
-
less
is available on Windows, but that is not installed by default no? WSL is also not installed by default, if I understand correctly.less
et al available?more
. Are you limited in what you can install/enable for some reason? If you're used to Unix command-line tools you will enjoy having them under Windows, and there's no down-side as far as I know. Here are some more examples and links if you need them.