OS/2, eCS & ArcaOS - Technical > Programming

Max. line length for calling utilities from a .cmd file

<< < (2/2)

Andreas Schnellbacher:
Thanks. I have now several options.

One slower fallback method already exists: Search with E code, so some options can be implemented later. (It's fast enough for searching in included files only, but not for searching in dirs and filemasks.)

Dave, you're probably right with the availability of grep.exe and sh.exe. Times have changed.

Andi, I didn't know that about 4os2.

Martin Vieregg:
You can write a cmd file. The limit of a single commands in a cmd file seems to be 1023 characters.

The limit when typing a command in cmd.exe is 259 characters. It seems to be syntax specific. A longer input shows an error message:

SYS1065: The input line is too long.

In MeShell, there is a limit of 255 characters because of a bug. It will be fixed in the next version 0.71. Then the combination of MeShell and 4os2 will work with longer lines. Together with cmd.exe, you will have a limit of 259 characters again.

Andreas Schnellbacher:
Thanks Martin. I was too lazy to try it out. I've tried it now for a .cmd file and got the same limit as you. 1023 should suffice for most grep dir specs I plan to use. That makes it easier.

The other value, 259, makes sense, because of _MAX_PATH = 260.

Martin Vieregg:
I have updated MeShell to 0.71. Not tried it yet, but with 4os2 now the command length limit should be 2048 characters.
Here you can download MeShell 0.71 (700 kB)

Navigation

[0] Message Index

[*] Previous page

Go to full version