Pensacola Linux User's Group
Welcome, Guest. Please login or register.
November 19, 2011, 02:13:20 pm

Login with username, password and session length
Search:     Advanced search
Happy New Year!
15812 Posts in 3083 Topics by 139 Members
Latest Member: speakatself
* Home Help Search Calendar Login Register
+  Pensacola Linux User's Group
|-+  Software
| |-+  Programming/Development
| | |-+  thinkgeek script
« previous next »
Pages: [1] Print
Author Topic: thinkgeek script  (Read 577 times)
oddball
Inquistive
**

Approval: 0
Posts: 37



View Profile
« on: January 09, 2011, 12:14:27 am »

Here's my script to grab a fortune from thinkgeek:

Code:
#!/bin/bash
echo;echo;wget -q http://www.thinkgeek.com/brain/fortune.cgi ;
sed -n '/blockquote/,/\/blockquote/p' ~/fortune.cgi |sed s/blockquote/thinkgeek/|sed s/\&quot\;/\"/g|sed s/\&\#39\;/\'/g|sed s/\&acute\;/\'/g|sed s/\<BR\>//g|sed s/\&lt\;/\</g|sed s/\&gt\;/\>/g|sed s/\&amp\;/\&/g|sed s/\&\#146\;/\'/g;echo;echo;
rm ~/fortune.cgi
Logged

"Ubuntu" -- an African word, meaning "Slackware is too hard for me"
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.308 seconds with 17 queries.