Qualifiers
Kenneth Brody
kenbrody at spamcop.net
Thu Dec 3 20:00:57 PST 2009
John Esak wrote:
> Yes, that is the idea of course... Very nifty... And to help further, the
> "getting the header only" part could be done with dd if=ix_file of=ixq_file
> count=1024 bs=1
>
> Meaning 1024 covers the index header fine and gives you a nice clean new
> index.
For efficiency's sake, I would use "bs=1024 count=1" instead. Not much
difference for a single file, but it adds up if scripting hundreds of indexes.
> Ken's done all the other work. Wow. Now, I want to see it in batch! :-)
> Which is why I always wrote it in filePro.
Current cmd.exe batch processing is actually pretty decent. In particular
for this case is the capability of multi-line for and if statements.
It might actually be doable in a Windows .bat file.
[...]
>> Pseudo-code (untested):
>>
>> for file in list_of_files
>> do
>> cd $PFDATA$PFDIR/filepro/$file
>> for qual in list_of_qualifiers
>> do
>> create empty key$qual
>> create empty data$qual
>> for ix in A through Z
>> do
>> if index.$ix exists, copy (header of) index.$ix to
>> index$qual.$ix
>> done
>> append "$qual" to qualifiers file
>> chown/chmod key$qual data$qual index$qual.*
>> rebuild all indexes in qualifier
>> done
>> done
--
Kenneth Brody
More information about the Filepro-list
mailing list