by yipbub · 6y ago · 0 comments
echo -e "command\n with a long output,\n and it's last line" |tee /dev/tty| tail -n 1| { read -d '\n' _output ; notify-send "$_output"; telegram-send "$_output"; }
This will send the last n lines of stdout to:- gnome-notifications
- telegram on my phone from a bot account that uses a unique notification sound
No comments yet.