you can write a small perl script to do the job.
just define how you would name that files...
the script is quite simple :
read your db
for each line split values
put the wanted value in a file
that's all...
my ($line, @data, $field);
$db_file_name = "FULL PATH TO YOUR DB";
$outdir = "DIRECTORY TO PUT FILES WITH TRAILING SLASH";
open (DB, $db_file_name);
LINE: while (<DB>) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_; chomp ($line);
@data = &split_decode($line);
# Assuming you want call your files as ID.txt where ID is in field 0
$outfile = @data[0].".txt";
open (OUT, ">$outdir/$outfile");
# Assuming data you want to export are in field 3
print OUT @data[3];
close OUT;
}
close DB;
exit;
sub split_decode
{
my ($input) = shift;
$input =~ s/\Q|\E$/$db_delim /o;
my (@array) = split (/\Q|\E/o, $input);
for ($i = 0; $i <= $#array; $i++)
{
$array[$i] =~ s/~~/|/og;
$array[$i] =~ s/`/\n/g;
return @array;
}
}
........................
i tried it...it works...
Valerio [Hypo] Verde
just define how you would name that files...
the script is quite simple :
read your db
for each line split values
put the wanted value in a file
that's all...
my ($line, @data, $field);
$db_file_name = "FULL PATH TO YOUR DB";
$outdir = "DIRECTORY TO PUT FILES WITH TRAILING SLASH";
open (DB, $db_file_name);
LINE: while (<DB>) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_; chomp ($line);
@data = &split_decode($line);
# Assuming you want call your files as ID.txt where ID is in field 0
$outfile = @data[0].".txt";
open (OUT, ">$outdir/$outfile");
# Assuming data you want to export are in field 3
print OUT @data[3];
close OUT;
}
close DB;
exit;
sub split_decode
{
my ($input) = shift;
$input =~ s/\Q|\E$/$db_delim /o;
my (@array) = split (/\Q|\E/o, $input);
for ($i = 0; $i <= $#array; $i++)
{
$array[$i] =~ s/~~/|/og;
$array[$i] =~ s/`/\n/g;
return @array;
}
}
........................
i tried it...it works...
Valerio [Hypo] Verde