News for hackers. Stuff that matters.
Re:Modernize your Bash Scripts by adding GUI by yipbub on Monday September 28, 2020 @03:16AM (#24613834)
I use something like:

    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

There are no comments on this comment yet.