LINUX.ORG.RU

Сообщения IgorekMag

 

Vopros po grep

Форум — General

Mozet li grep iskat' chisla dlinoy bolee odnogo razriada iz diapazona, naprimer ot 1005426000 do 1005512400?

IgorekMag
()

Need help

Форум — General

Mozno li vipolnit' poisk komandoy grep po diapazonu chisel, naprimer ot 1005426000 do 1005512400?

Problema v tom, chto pri vipolnenii, naprimer, takoy komandy:

"cat /var/log/squid/access.log | grep [`date -d 'yesterday 00:00:00' +%s`-`date -d 'yesterday 23:59:59' +%s`] > /var/log/squid/yesterday.log"

grep rabotaet po kazdoy otdel'noy cifre: dlia chisla 1005426000 on ischet po 1, 0, 0, 5, 4, ..., a ne po celomu chislu.

P.S. Esli eto nevozmozno, podscazite pls., kak osushestvit' takuyu fil'traciu drugimi sredstvami (perl, awk).

IgorekMag
()

RSS подписка на новые темы