Re: netpbm vs. pbmplus
On Thu, 25 Jan 1996, Dale Scheetz wrote:
> Because of the way/reasons the lines are created, the algorith is
> simple:
>
> If a line is followed by a line that is the same, except for an
> additional path element, that line is a path, otherwise the last
> element of the line is a file.
a passable first approximation, but not a final solution.
As I mentioned immediately after asking the question, this method will
identify an empty directory as a file.
e.g. if the list of directories & filenames to be processed contains
an empty directory called, for example, /usr/lib/whatsit then your
algorithm will incorrectly identify it as a file.
Dirk came up with a neat generic solution to the question using perl.
Craig
--
cas@muffin.pronet.com cas@muffin.apana.org.au
* Unix Consulting: Installation, Configuration, & Support. *
* --- Also, contact me if you need your Dos/Win/OS2 LAN connected to --- *
* --- the Internet. --- *
Reply to: