Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- From: jreljac@xxxxxxxxx
- Date: Fri, 15 Jun 2007 15:17:03 -0000
Howdy,
Please be gentle, I'm a perl novice to say the least.
I have the following script (called bk.pl right now) :
foreach $argnum (0 .. $#ARGV) {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime
time;
exec ("mysqldump --user=*** --password=*** $ARGV[$argnum] > /backups/
$ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql");
exec ("tar czpf $ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec.sql
$ARGV[$argnum]--$mon-$mday-$year-$hour-$min-$sec");
}
When I run it (./scripts/bk.pl dbname) it runs the first exec
properly, but it dose not do the second. I get the error
(Maybe you meant system() when you said exec()?)
Any ideas as to why this is happening?
Thanks,
Jason
.
- Follow-Ups:
- Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- From: Paul Lalli
- Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- From: Chas Owens
- Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- From: Martin Barth
- Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- Prev by Date: Re: dynamic loading option?
- Next by Date: RE: Having trouble porting an application to MS-Windows
- Previous by thread: Comparing the Perl encrypted files
- Next by thread: Re: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- Index(es):
Relevant Pages
|