V8Power Tools -- Update

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

V8Power Tools -- Update

Jerome Shidel
Hello all,

I just released an update to V8Power Tools.
It has some general improvements to a couple tools.

Also, it includes a brand new utility called veach.

veach can be used for processing lists of items or commands.

Here are a couple example usages:

You have a directory full of bitmaps you want to resize using some program called RESIZE.EXE…

        veach /d *.bmp /x resize * /scale 50%

You want to take a file that lists a bunch of stuff and sort then display those items with a count using VECHO.COM.

        veach /f items.txt /s /x vecho “Item @ of # is *”

You want to the output of grep and display the STAT.EXE results for those items.

        grep -iv “^IGNORE THIS” | veach /I /x stat *

You want to execute every BAT, EXE and COM program in a directory and ignore any errors they may have. :-)

        veach /d *.exe /d *.com /d *.bat /s /c /x

You just want a sorted list of all the BAT, COM and EXE files in a directory

        veach /d *.exe /d *.com /d *.bat /S /L

Basically, think of it this way. Everything after the /X switch is like you typed it into the command line. * is expanded to the list item, @ is expanded to the index and # is expanded to the count. if you provide nothing after /X, * is used (find and run this thing). Shell internals like type, dir, copy … are not supported at present and you would need to would need to place them in a batch file. Something like:

@ECHO OFF
del %1

veach /d *.* /x XDEL.BAT *

Now available through FNDPKG or download at

https://fd.lod.bz/repos/current/pkg-html/v8power.html
or
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/latest/pkg-html/v8power.html

Jerome



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: V8Power Tools -- Update

Paolo Vincenzo Olivo
Hi Jerome,
I've just tried your veach.com utility and it looks like it shall really come in handy! I was missing a program capable of appending a command to a sorted list (like a  |   in Unix ) .
Nice job, and thanks for your effort

Yours Sincerely,
P.V.O.
'I have a wish. It as a fear as well - that in my end will be my beginning'. [Ernesto Guevara]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: V8Power Tools -- Update

Jerome Shidel
Hello Paolo,

> On Aug 1, 2017, at 6:37 AM, Paolo Vincenzo Olivo <[hidden email]> wrote:
>
> Hi Jerome,
> I've just tried your veach.com utility and it looks like it shall really
> come in handy! I was missing a program capable of appending a command to a
> sorted list (like a  |   in Unix ) .
> Nice job, and thanks for your effort

Thank you.

Just like you, I would find myself either doing some things the long way because
there was just no easy way to do X on a list of things. Wether that list was some
generic things I wanted to run through a program or something more complex.

Besides, what other utility will let suicidally run every program in a directory with a
simple “veach /d *.* /c /x”  command? :-)

I could have really used veach in FDI. But, I didn’t require it. With all the ASCIIZ
string juggling and parsing it would need to do, I procrastinated making it. But alas,
I finally got to it.

Just a note on veach, I restricted its memory usage to 16KB maximum for the
CODE + DATA + STACK. That leaves roughly 11K for list items. That should be
plenty for most things. After all, a directory list would use 6-18 bytes per item. That
would allow for approximately 625+ directory items before getting the “Out of Memory”
error. Since unused memory is freed, this would have no effect on the memory
consumed by smaller lists. So, I may just increase the limit to 32 or 64K.

At some point, I will probably add a /U switch to de-duplicate items. You could run
into duplicate items with a command like “veach /d *.bmp /d abc.* /x resize * /scale 50%”
If there was an abc.bmp, it would be shrunk twice.

Jerome
 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: V8Power Tools -- Update

tom ehlert

>> Hi Jerome,
>> I've just tried your veach.com utility and it looks like it shall really
>> come in handy! I was missing a program capable of appending a command to a
>> sorted list (like a  |   in Unix ) .
>> Nice job, and thanks for your effort

> Thank you.

> Just like you, I would find myself either doing some things the long way because
> there was just no easy way to do X on a list of things. Wether that list was some
> generic things I wanted to run through a program or something more complex.

> Besides, what other utility will let suicidally run every program in a directory with a
> simple “veach /d *.* /c /x”  command? :-)

> I could have really used veach in FDI. But, I didn’t require it. With all the ASCIIZ
> string juggling and parsing it would need to do, I procrastinated making it. But alas,
> I finally got to it.

    veach /d *.bmp  /x resize * /scale 50%

is more or less the same as

 FOR %i in (*.bmp) do resize %i /scale 50%

(use %%i when used in batch files)

from a batch file, FOR has also lower memory requirements although
this is most likely irrelevant for FDI

unfortunately this turns up a bug in FOR:


    for %i in (*.*) do echo %i

works as expected, also echoing the command itself.

    E:\FREEDOS\SRC>echo SOFTIC~1.IMA
    SOFTIC~1.IMA

however

        for %i in (*.*) do @echo %i

E:\FREEDOS\SRC>@echo SOFTIC~1.IMA
Bad command or filename - "@ECHO".


bug report filed

Tom.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: V8Power Tools -- Update

Jerome Shidel
Hi Tom,

> On Aug 1, 2017, at 10:27 AM, Tom Ehlert <[hidden email]> wrote:
>
>
>>> Hi Jerome,
>>> I've just tried your veach.com utility and it looks like it shall really
>>> come in handy! I was missing a program capable of appending a command to a
>>> sorted list (like a  |   in Unix ) .
>>> Nice job, and thanks for your effort
>
>> Thank you.
>
>> Just like you, I would find myself either doing some things the long way because
>> there was just no easy way to do X on a list of things. Wether that list was some
>> generic things I wanted to run through a program or something more complex.
>
>> Besides, what other utility will let suicidally run every program in a directory with a
>> simple “veach /d *.* /c /x”  command? :-)
>
>> I could have really used veach in FDI. But, I didn’t require it. With all the ASCIIZ
>> string juggling and parsing it would need to do, I procrastinated making it. But alas,
>> I finally got to it.
>
>    veach /d *.bmp  /x resize * /scale 50%
>
> is more or less the same as
>
> FOR %i in (*.bmp) do resize %i /scale 50%
>
> (use %%i when used in batch files)
>
> from a batch file, FOR has also lower memory requirements although
> this is most likely irrelevant for FDI
>
> unfortunately this turns up a bug in FOR:
>
>
>    for %i in (*.*) do echo %i
>
> works as expected, also echoing the command itself.
>
>    E:\FREEDOS\SRC>echo SOFTIC~1.IMA
>    SOFTIC~1.IMA
>
> however
>
>        for %i in (*.*) do @echo %i
>
> E:\FREEDOS\SRC>@echo SOFTIC~1.IMA
> Bad command or filename - "@ECHO".
>
>
> bug report filed
>
> Tom.
>

Yep, however the FOR like stuff in veach was added to be mostly "feature complete"

The main need was for doing stuff like this:

veach /f base.lst /f extra.lst /s /x install.bat * @ #
(Why it should do uniques)

That would combine and sort two lists in files, then pass them each to install.bat with an index and count.

Or, take the output of grep and do the same:

grep -iv "^;" stuff.lst | veach /I /S /X install.bat * @ #

Or combine stuff from the pipe and a file with /f & /i

Or crazy things like

veach /d *.com /d *.exe /S /L | grep -iv ^D | veach /I /X showme @ # *

But again, FOR does have its advantages too. FOR really doesn't eat any RAM. It also can set ENV variables. Calling a BAT file over and over would be faster. And some other stuff.

You can accomplish the stuff veach provides in other ways. After all, FDI does some of that now. But, veach does seem to simplify a lot of it.

Jerome

>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Freedos-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/freedos-user


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: V8Power Tools -- Update

Paolo Vincenzo
This post was updated on .
In reply to this post by Jerome Shidel
Hi Jerome,
I personally think that 16k is the correct bearable amount of memory veach
should be allowed to use, especially considering the large number of files
it can sort already, as you clarified. Never found myself sorting a larger
number of files within a directory, but in some cases maybe, I used FOR
with a larger number of text strings within a file, to exec commands like
echo, type, call, replace.

Although usually, I'm not running out of ram, and wasting 64k wouldn't make
any difference most of times, a 16k eating utility will always look more
attractive and versatile to any user (just my opinion). I would tolerate
32-64k if it were some sort of larger program: maybe a TSR, able to process
user's input or sort files changing in a given directory, and possibly exec
batch files and commands consequently.

All things considered, as you stated, FOR and veach are different utilities
and attempting to use FOR  to reproduce all the functions you designed your
program for, sounds to me like a forced workaround.
I don't think using for excludes veach and vice versa :), as they're
designed 'mainly' to accomplish different tasks.

Perhaps when I'll have the chance to make use of your program and deepen
it's knowledge, I might post further feedback

Hope this helps,
Cheers,
Paolo

On 1 Aug 2017 14:43, "Jerome Shidel" <Jerome@shidel.net> wrote:

Hello Paolo,

> On Aug 1, 2017, at 6:37 AM, Paolo Vincenzo Olivo <pvins@outlook.it> wrote:
>
> Hi Jerome,
> I've just tried your veach.com utility and it looks like it shall really
> come in handy! I was missing a program capable of appending a command to a
> sorted list (like a  |   in Unix ) .
> Nice job, and thanks for your effort

Thank you.

Just like you, I would find myself either doing some things the long way
because
there was just no easy way to do X on a list of things. Wether that list
was some
generic things I wanted to run through a program or something more complex.

Besides, what other utility will let suicidally run every program in a
directory with a
simple “veach /d *.* /c /x”  command? :-)

I could have really used veach in FDI. But, I didn’t require it. With all
the ASCIIZ
string juggling and parsing it would need to do, I procrastinated making
it. But alas,
I finally got to it.

Just a note on veach, I restricted its memory usage to 16KB maximum for the
CODE + DATA + STACK. That leaves roughly 11K for list items. That should be
plenty for most things. After all, a directory list would use 6-18 bytes
per item. That
would allow for approximately 625+ directory items before getting the “Out
of Memory”
error. Since unused memory is freed, this would have no effect on the memory
consumed by smaller lists. So, I may just increase the limit to 32 or 64K.

At some point, I will probably add a /U switch to de-duplicate items. You
could run
into duplicate items with a command like “veach /d *.bmp /d abc.* /x resize
* /scale 50%”
If there was an abc.bmp, it would be shrunk twice.

Jerome

------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user
Loading...