X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=notifyirc.sh;fp=notifyirc.sh;h=1f4a4ab3d9a62d7e7a85ef3f8dae72e08ba9c9de;hb=4f43ba394fe3543ec4615f2f4d2614d6bf6700c3;hp=0000000000000000000000000000000000000000;hpb=35b417653424722704b8f699ef6ad6b43cbcfa65;p=scripts-20-100.git diff --git a/notifyirc.sh b/notifyirc.sh new file mode 100755 index 0000000..1f4a4ab --- /dev/null +++ b/notifyirc.sh @@ -0,0 +1,15 @@ +#!/bin/bash +ssh zamok tail -n 0 -f .weechat/logs/crans/*/*/laloutre.log \ +| while read line; do + echo "${line}" | grep "notify" + if [ $? = 0 ] + then + # On enlève le timestamp + line=$(echo "${line}" | sed 's/^....-..-.. ..:..:..\t//') + # On isole le pseudo. + pseudo=$(echo "${line}" | sed 's/^\([^\t]\+\)\t.*/\1/') + line=$(echo "${line}" | sed 's/^[^\t]\+\t//') + # On notifie avec en titre le pseudo et en contenu le reste de la ligne + notify-send -i /home/vincent/otter.gif "${pseudo}" "${line}" + fi +done