Search found 161 matches

by jfl
25 Jan 2021 08:10
Forum: DOS Batch Forum
Topic: SORT /UNIQUE /UNI_OUTPUT...
Replies: 4
Views: 49

Re: SORT /UNIQUE /UNI_OUTPUT...

Ah, OK!
I expected it would output strings like case-dependent sorts in Unix:

Code: Select all

ABC
XYZ
abc
xyz
I just checked /CASE_SENSITIVE is present in XP and later versions of Windows, but not in Windows 98. Funny I never heard of it.
by jfl
25 Jan 2021 06:35
Forum: DOS Batch Forum
Topic: SORT /UNIQUE /UNI_OUTPUT...
Replies: 4
Views: 49

Re: SORT /UNIQUE /UNI_OUTPUT...

I think that TEMP and path are not part of the supported options. /TEMP worked for you as an abbreviation of the documented /TEMPORARY option. Also note that contrary to the other options before it, it is part of a longer string "TEMP path": C:\Windows\System32>strings sort.exe | ag "[a-z]{4,}" [Uni...
by jfl
24 Jan 2021 09:15
Forum: DOS Batch Forum
Topic: Request for help to speed up batch program for 17,000 TXT files
Replies: 6
Views: 100

Re: Request for help to speed up batch program for 17,000 TXT files

For quickly searching for strings in a large set of text files, try The Silver Searcher . The ag.exe program in that zip file is a port for Windows that I maintain, of the Unix tool ag. It supports full fledged regular expressions, so finding any sequence of valid characters you can think of will be...
by jfl
24 Jan 2021 08:45
Forum: DOS Batch Forum
Topic: RPN.exe: Floating-point arithmetic operations in Reverse Polish Notation
Replies: 1
Views: 90

Re: RPN.exe: Floating-point arithmetic operations in Reverse Polish Notation

I gave it a try, and it's indeed nice and easy to use for doing calculations at the command prompt. :) The rpn.exe executable is surprisingly small. Was it all written in assembly language? The stack-based RPN notation reminds me a lot of the old Forth programming language. Add support for strings, ...
by jfl
22 Jan 2021 12:45
Forum: DOS Batch Forum
Topic: A script making it easy to set a variable with the output of a command
Replies: 2
Views: 55

Re: A script making it easy to set a variable with the output of a command

No, you still can't nest them, but you can get the same effect very easily:

Code: Select all

$ VAR1 innermost_command
$ VAR2 middle_command %VAR1%
outer_command %VAR2%
So, yes, three commands instead of one. But barely more characters to type overall than in Bash or PowerShell.
by jfl
22 Jan 2021 10:47
Forum: DOS Batch Forum
Topic: A script making it easy to set a variable with the output of a command
Replies: 2
Views: 55

A script making it easy to set a variable with the output of a command

Unix shells, and Windows own PowerShell, allow nesting commands inside each other using the $(subcommand) syntax. This syntax is extremely convenient for capturing the output of a subcommand, and passing it as an argument to an outer command. For example, using Docker, you can find containers that h...
by jfl
18 Jan 2021 02:22
Forum: DOS Batch Forum
Topic: Issue with executing a command in parallel
Replies: 2
Views: 185

Re: Issue with executing a command in parallel

You should use a Win32 port of the Unix tail utility. It's designed precisely to do what you want to do. There's one coming with git for Windows, if you have it. Typically in "C:\Program Files\Git\usr\bin\tail.exe". Else you can find a tail.exe in old win32 ports like UnxUtils or GnuWin32 . Then the...
by jfl
11 Jan 2021 09:16
Forum: DOS Batch Forum
Topic: Is there a way to make a bootable batch file?
Replies: 5
Views: 314

Re: Is there a way to make a bootable batch file?

This existed in MS-DOS, and was called AUTOEXEC.BAT: The first thing MS-DOS did after booting was to automatically run AUTOEXEC.BAT. Now you can still legally do that using FreeDOS. Windows is different. It is not an open-source operating system. Its commercial license forbids you to copy it to anot...
by jfl
08 Jan 2021 07:09
Forum: DOS Batch Forum
Topic: ERRORLEVEL and Where.exe program
Replies: 2
Views: 274

Re: ERRORLEVEL and Where.exe program

It's also possible to do that without invoking the where.exe program at all. Ex: C:\JFL\Temp>for %p in (notepad.exe) do @echo set N=%~$PATH:p set N=C:\Windows\System32\notepad.exe C:\JFL\Temp>for %p in (nothing.exe) do @echo set N=%~$PATH:p set N= C:\JFL\Temp> In a batch file, it'd become: for %%p i...
by jfl
07 Jan 2021 04:41
Forum: DOS Batch Forum
Topic: Equivalent 9XDos code to NT Find bat/cmd path %~dp0
Replies: 12
Views: 811

Re: Equivalent 9XDos code to NT Find bat/cmd path %~dp0

truename is an internal command of the command.com shell. This is independent of DOS or Windows 98: command.com is also available in Windows XP, as an alternative to its native cmd.exe shell. I'm pretty sure that you can even make the XP version of command.com run in 32-bits versions of Vista and la...
by jfl
06 Jan 2021 04:09
Forum: DOS Batch Forum
Topic: which.exe - The best of Windows where.exe and Unix which, and some more
Replies: 13
Views: 10334

Re: which.exe - The best of Windows where.exe and Unix which, and some more

I found this entry presented as a version there: https://www.tiraniddo.dev/2019/09/overv ... iases.html
And this made sense to me as, as you've noticed, there are 4 strings in the list, not 3.

Jean-François
by jfl
05 Jan 2021 11:58
Forum: DOS Batch Forum
Topic: which.exe - The best of Windows where.exe and Unix which, and some more
Replies: 13
Views: 10334

Re: which.exe - The best of Windows where.exe and Unix which, and some more

@Steffen I've posted on https://stackoverflow.com/a/65583702/2215591 a reply with all what I've found so far on how to use App Exec Link targets. I really hope that somebody eventually gets to the bottom of it, and explains how to use the information in these links (and just the information in these...
by jfl
19 Dec 2020 15:32
Forum: DOS Batch Forum
Topic: which.exe - The best of Windows where.exe and Unix which, and some more
Replies: 13
Views: 10334

Re: which.exe - The best of Windows where.exe and Unix which, and some more

Maybe this is where the other information I was talking about are useful: The Windows Terminal probably uses a standard entry point name, so that CreateProcess() can run wt.exe without the additional information; Whereas Edge uses a non standard entry point? You can see for yourself by dumping repar...
by jfl
19 Dec 2020 05:32
Forum: DOS Batch Forum
Topic: which.exe - The best of Windows where.exe and Unix which, and some more
Replies: 13
Views: 10334

Re: which.exe - The best of Windows where.exe and Unix which, and some more

Hello, I've released version 1.16 of my which.exe program for DOS and Windows. (Version 1.15 had some internal changes for compatibility with MacOS, but the DOS/Windows versions were otherwise unchanged.) It is available as part of the latest System Tools Library release: SysTools.zip As usual, this...
by jfl
02 Nov 2020 03:04
Forum: DOS Batch Forum
Topic: Some holiday animations (from Vt100.net)
Replies: 6
Views: 1415

Re: Some holiday animations (from Vt100.net)

Cute, thanks for sharing :-)