You are not logged in.
Here is a piece of script on wiki,
alias archnews="echo -e \"$(echo $(curl --silent http://www.archlinux.org/feeds/news/ | sed -e ':a;N;$!ba;s/\n/ /g') | sed -e 's/<\/a>/@/g' | sed -e 's/<title>/\\n\\n\\n\\t:: \\e[01;31m/g' -e 's/<\/title>/\\e[00m ::\\n/g' | sed -e 's/<link>/ [ \\e[01;36m/g' -e 's/<\/link>/\\e[00m ]/g' | sed -e 's/<description>/\\n\\n\\e[00;37m/g' -e 's/<\/description>/\\e[00m\\n\\n/g' | sed -e 's/<p>/\n/g' | sed -e 's/<a href\=\"\([^\"]*\)\">\([^@]*\)@/\\e[01;32m\2\\e[00;37m \\e[01;34m[ \\e[01;35m\1\\e[00;37m\\e[01;34m ]\\e[00;37m/g' | sed -e 's/<li>/\n \\e[01;34m*\\e[00;37m /g' | sed -e 's/<[^>]*>/ /g' | sed -e 's/<.*>//g')\n\n\""
I found it would slow down the terminal from opening under slow network connection (or without network).
It take about 1 second to open a new terminal with it in .bashrc.
Forgive my English.
Last edited by sillyousu (2012-09-10 14:23:40)
Offline
Take this command as an example:
$ alias thetime="echo $(date)"
$ thetime
Mon Sep 10 12:54:38 CEST 2012
$ sleep 10
$ thetime
Mon Sep 10 12:54:38 CEST 2012
The $() command in double quotes is launched once at shell start up. If news comes while the shell stays open, this alias won't actually fetch the news.
Offline