0

I'm trying to have my remote ssh session send me notifications locally when my nick is mentioned on IRC.

The following code pops a Notification window saying "IRC Message", but with no content, every time my nick is mentioned or I type something in IRC.

The only time it's actually showing content is when I do a "/me" action, so "*nick and content" show up under "IRC Message" along with a timestamp. What am I doing wrong that it won't show regular messages?

ssh ircuser@server.net "tail -n 1 -q -f ~/irclogs/*/*.log|grep -i --line-buffered usernick"|while read line;do notify-send "IRC Message" "${line}";done

Thanks for any help.

user1943442
  • 198
  • 4
  • 17
  • It was a problem with the MATE notification center, it expected HTML format from notify-send and used the "<>" tags around the nick as tags. Made a work around – user1943442 Oct 19 '13 at 05:42

2 Answers2

0

Assuming you'r looking on the right file logs..=P

Not sure, but you might try stdbuf -o0 grep nickname or unbuffer

Jose Almeida
  • 54
  • 1
  • 6
  • log files are correct because it pops up when it catches the nick, just doesn't have anything in the ${line} ... I don't know what stdbuf -o0 does but I tried it, same results – user1943442 Oct 19 '13 at 02:01
  • the presence of special char ('\r') crossed my mind..but forgot about the <>/html, good one! – Jose Almeida Oct 19 '13 at 15:20
0

It was a problem with the MATE notification center, it expected HTML format from notify-send and used the "<>" tags around the nick as tags. Made a work around

user1943442
  • 198
  • 4
  • 17