[systemd-devel] journalctl to csv

Kai Hendry hendry at iki.fi
Sat Jan 26 22:10:25 PST 2013


Hi there,

As a simple exercise for me to better understand journalctl I want to
echo out the Lid open/close events as a space delimited file: epoch
opened/closed

Furtherest I got was this attached lid script.

$ bash lid.sh | sort
1359218250 0
1359251787 1
1359253749 0
1359259050 1

Which feels a bit cumbersome and slow. Is there a better way?

Furthermore I would like to follow the event and echo & pipe out the
event as soon as it's seen. Since I can't seemingly match "Lid*", I'm
not sure how to do that. Also I can't figure out how to follow without
showing past events.

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lid.sh
Type: application/x-sh
Size: 402 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130127/c3792f38/attachment.sh>


More information about the systemd-devel mailing list