The default alias Alert is for the command
notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"
Executing alert
gives an notification with text Alert and an terminal icon.
Executing it with one param like alert !!!!!
gives notification with text Alert !!!!! and !!!!!.
So, what's the difference between simple notify-send
command and this complexed alias which uses notify-send, echo, history, tail and sed?
In which situations is this alias useful or was it just created for pun(Something like using sudo sudo sudo sudo sudo apt-get install
I'm using Ubuntu 12.10
notify-send Linux Ubuntu
it's much the same, the only difference is thatalert
shows a icon.But I don't understand why the command contains sed,tail and history