in reply to Firebird databases backup script
/opt/databases contains 5 files. Two with fb extension, three with gdb. Foreach loop should (as i think) push to @files table all filenames with extensions from @ext. Now this code works only for first extension on table @ext and second issue it inserts me in table @files first and last item empty. The execution result looks:#Create database filenames table @files my @ext = ("fb", "gdb", "ib"); my $data = "/opt/databases"; foreach (@ext) { my $load = glob "$data*.$_"; push (@files, $load); } foreach (@files) { print "Found database: $_ \n"; }
The first and last are unwanted, they breaks the script at gbak - it dies due to empty filename to backup.Found database: Found database: /opt/databases/DEMO.fb Found database: /opt/databases/demo2.fb Found database:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Firebird databases backup script
by Anonymous Monk on Mar 02, 2012 at 01:00 UTC | |
by Mery84 (Novice) on Mar 02, 2012 at 09:48 UTC | |
by stefbv (Priest) on Mar 02, 2012 at 11:49 UTC |