Как делают меня, grep доступ сервера регистрируется для уникального дюйм/с и определенной страницы?

423 байта с Языком:: EN:: Число:

use Lingua::EN::Numbers qw/num2en num2en_ordinal/;
@l=map{($i++?num2en($i):'a')." $_"}split/\n/,<<"";
partridge in a pear tree
turtle doves, and
french hens
calling birds
gold rings
geese a-laying
swans a-swimming
maids a-milking
ladies dancing
lords a-leaping
pipers piping
drummers drumming

print"On the ".num2en_ordinal($_+1)
." day of Christmas, my true love gave to me ",
join(', ',reverse@l[0..$_]),"\n\n"for(0..11);

Или 480 байтов в жемчуге, не используя Язык:: EN:: Числа:

@n=qw/first second third forth fifth sixth seventh eigth nineth tenth eleventh twelfth/;
@l=<DATA>;chomp@l;
print"On the $n[$_] day of Christmas, my true love gave to me ",
join(', ',reverse@l[0..$_]),"\n\n"for(0..11);
__DATA__
a partridge in a pear tree
two turtle doves, and 
three french hens
four calling birds 
five gold rings 
six geese a-laying
seven swans a-swimming
eight maids a-milking
nine ladies dancing
ten lords a-leaping
eleven pipers piping
twelve drummers drumming

Это должно смочь быть уменьшенным далее, так как числа являются очень повторяющимися.

8
задан damon 10 July 2009 в 15:14
поделиться

2 ответа

Assuming this is a standard Apache log, and assuming you are on Unix, I usually do

awk '{print $1}' access.log|sort -u

The awk filters out all IP addresses, the sort then removes duplicates.

To find out all accesses to a URL, I do

grep URL access.log

Of course, you will have to replace "URL" with the specific one you search for.

26
ответ дан 5 December 2019 в 06:38
поделиться

You could also use something like webalizer to process the logs as another option.

-1
ответ дан 5 December 2019 в 06:38
поделиться
Другие вопросы по тегам:

Похожие вопросы: