Reading Chat Logs with Awk

Created on 2022-08-20T00:31:39-05:00

Return to the Index

This card can also be read via Gemini.

Second Life can be asked to stream logs of chats and IM to files in a special directory. We can abuse this with some unix utilities to have messages spoken out loud (ensuring we don't miss on important conversations.)

# read comments as they are appended to the log; starting with zero lines of context
tail -n0 -f  |
# deletes all the content between message start through the second colon
awk -F: '{$1=""; $2=""; print; fflush(stdout)}' |
# speaks the text out loud
espeak