Fred Stluka via plug on 11 Feb 2021 09:43:39 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Scripting question


JP, Michael, and others,

On 2/10/21 9:33 PM, JP Vossen via plug wrote:
Way back when I used to write a lot of DOS/Windows batch files, that's actually how I got into scripting.  You could actually do a lot more with cmd.exe than most people knew, but it's still nothing compared to a real shell or even PS.  I have some VERY old clues for those on https://www.jpsdomain.org/windows/winshell.html and there might still be useful bits there.

Yeah, 20 years ago, I used to do a lot of Windows BAT files too.
As JP says at his link above, Tim Hill's "Windows NT Shell Scripting"
book was a real eye-opener.  CMD.EXE was much weaker than a
a Unix shell, but it pointed me to a LOT of really obscure ways to
do things.  Microsoft hid capabilities of things like the '-exec"
option of the Unix "find" command in their FOR loop.  Same for
the basic ability to read from a file or a string.  And prompting the
user for input is hidden in the SET command.  Bizarre!

I wrote up tips about many of them.  See:
- http://bristle.com/Tips/Windows.htm#batch_file_tips

Enjoy!
--Fred
------------------------------------------------------------------------
Fred Stluka -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
------------------------------------------------------------------------



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug