Home > Slackware > inotify mplayer log stats

inotify mplayer log stats

#!/bin/sh
# done by seikath for digisign-bg.com
# Fri, 12 Feb 2010 17:41:28 +0100

inotail  -f /opt/bin/slave.mplayer.log \
| awk ‘/^Playing/{ data=strftime(“%Y-%m-%d %H:%M:%S %z”,systime())”\t”gensub(/^.*\//,””,gensub(/.$/,””,$1)); print data | ” xargs /opt/bin/writetofile.sh”; close(” xargs /opt/bin\
/writetofile.sh”)}’

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: