Email Focus

Samuel }slund samuel@update.uu.se
Mon Dec 10 21:29:01 2001


On Mon, 10 Dec 2001, Frank Tobin wrote:
> Mike Touloumtzis, at 11:07 -0800 on 2001-12-10, wrote:
> 
> > Incorporating unrelated functionality like recursion is a symptom of
> > a weak command line environment.  The recursive 'find' command line I

Yes, and is anyone surpriced that M$ Windoze has a weak commandline,
stating it does not make it any better for us that have to work with it.

> > posted here earlier isn't a hackish workaround, it's a best practice.
> 
> Not necessarily.  Your find example executes gpg on each file in the tree;
> however, you've just increased the cost of computation by
> n*(GnuPG-startup+shutdown) time.

Not to mention the time for typing the passphrase a zillion times if doing
symetric encryption...
(unless gpg resets the filedescriptor when using --passphrase-fd n)

> Stretching your argument a bit further, I could argue that 'cp' shouldn't
> take multiple source arguments, which is kind of silly.  There is a
> balance between ease of use, performance, and 'cleanness' that needs to be
> struck.

In the case of a security sensitive application like GnuPG code size is
also an important factor, _all_ functionality add complexity to something
that (idealy) should be possible to verify (not only test).

> > Which is better, to have every random tool implement recursive
> > functionality in mutually incompatible ways, or to have a few general
> > purpose tree walking tools like 'find', which you can use to make any
> > tool recursive?
> 
> Your general-purpose-tree-walking tool maybe should be a library call, so
> that minimal work need be done to implement recusive application.

That probably would be a good idea but it would still add complexity to
the application, and in this case a whole library that is outside of the
trusted applications controll.

Even if (as I think) everything else pointed towards adding this
functionallity the complexity argument aught to keep it out.

Just my thoughts.
//Samuel

PS.
A possible way to do recursion from a dos prompt is making a batchfile
something like this:
REM ****************** Example file ****
echo off
REM file: e:\tmp\recursive_diff.bat
for /D %%A in ( %1\* ) do call e:\tmp\recursive_diff.bat %%A %%A
fc %1\* %2\* >> e:\tmp\res.txt 2>> e:\tmp\fel.txt
REM ****************** END Example file ****

Note that most dos environments have no good way of finding where the
executing batchfile is located so that has to be hardcoded.
"fc" is the command that is run on all files.
I used this particular file fo make sure everything had been copied
correctly after moving alot of data from one drive to another.
DS.