Channelling the Techno-Zeitgeist

May 10, 2009 13:51

Current Music: Silence

Dear Lazyweb,

The way Apache names its access logs is causing me grief and, because my bashfu is weak, I'm calling on you for assistance.

Cut to prevent non-technical types encountering the Lovecraftian madness of shell scripting )

Leave a comment

Comments 4

strangedave May 10 2009, 05:42:31 UTC
can't you just put the two on one line separated by a ; ?
If it needs to all be part of the same pipe or something, than you might need to make a tiny script.

Reply

_fustian May 10 2009, 05:54:40 UTC
can't you just put the two on one line separated by a ; ?

That didn't seem to work when I tried it before.

If it needs to all be part of the same pipe or something, than you might need to make a tiny script.

I was hoping to avoid that, but thanks for the suggestion.

Reply


ferrouswheel May 10 2009, 05:47:31 UTC
Something like

gunzip -dc `ls -tr DOMAIN-access*.gz` | cat - DOMAIN-access.log.1 DOMAIN-access.log

might work. "-" is often used to indicate stdin.

Reply

_fustian May 10 2009, 05:55:25 UTC
Yes; works. Thanks for that!

Reply


Leave a comment

Up