strftime

Honza Pazdziora adelton na informatics.muni.cz
Čtvrtek Červen 17 16:32:08 MEST 1999


> 
> $s_command='/usr/bin/wget -c -O /data/in/25-880/in%y%m%d.log -o '.
>            '/data/in/25-880/in%y%m%d.log.$$.wg '.
>            '-t 5 -nv http://xxx.xxx-xxx-xxx.cz/in%y%m%d.log';
> $command=strftime $s_command, gmtime(time);
> 
> print "$command\n";
> 
> ****
> 
> Problem je, ze to funguje jenom trochu. Prvni dva in%y%m%d se v pohode
> nahradi, ale ten posledni ne:
> 
> $ ./testik
> /usr/bin/wget -c -O /data/in/25-880/in990617.log -o \
> /data/in/25-880/in990617.log.$$.wg -t 5 -nv \
> http://xxx.xxx-xxx-xxx.cz/in99˙żoü˙żW(
>                           ^^^^^^^^^^^^
> 
> Proc? Je snad strftime omezen na urcitou delku? 

Vypada to, ze tam nejaky problem je:

$ perl
use POSIX;
my $a =
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa%y%m%d.logbbbbbbbbbbbbbbbbbbbbbbbbbb%y%m%d.logccccccccccccccccccc%y%m%d.logdddddddddddddddddddddddddddddddddddddddddddddd%y%m%d.logeeeeeeeeeeeeeeeeeeeeeeeeeeeeee%y%m%d.logffffffffffffffffffffffff%y%m%d.log';
my $command = strftime $a, gmtime;
print "$command\n";
__END__
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa990617.logbbbbbbbbbbbbbbbbbbbbbbbbbb990617.logccccccccccccccccccc990617.logddddddddddddd
$ perl -v

This is perl, version 5.004_04 built for IP19-irix

------------------------------------------------------------------------
 Honza Pazdziora | adelton na fi.muni.cz | http://www.fi.muni.cz/~adelton/
 make vmlinux.exe			-- SGI Visual Workstation Howto
Any spam sent to my email will be rewarded by complaint to your ISP abuse
  team and abuse teams of servers that relayed that message. It works.


Další informace o konferenci Perl