r/ScriptSwap • u/philkav • Mar 05 '12
Get Latest XKCD [BASH]
#!/bin/bash
#By Philip Kavanagh
info=curl -s http://xkcd.com/ | grep -- imgs.xkcd.com/comics | sed -n 1p
comicURL=echo $info | cut -f2 -d"\""
titleTEXT=echo $info | cut -f4 -d"\""
wget --quiet $comicURL -O /tmp/xkcd.$$
xdg-open /tmp/xkcd.$$
notify-send "XKCD Title-text" "$titleTEXT"
echo $titleTEXT
15
Upvotes
View all comments
Show parent comment
2
u/philkav Mar 07 '12
it prints that here:
if you have notify-send installed, it will appear as a non-intrusive popup box on the corner of your screen