View Single Post
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#1158
Hi,

I have created a script to scrape data to view the cricket word cup result. This following is the code. I tried running it with QBW, but I am not seeing any result. But in terminal it is showing the required result.

I am running the command in QBW as
Code:
sh /path/to/script.sh
This is the script
Code:
#!/bin/sh
#Script idea from http://www.badzilla.co.uk/Screenscraping-using-wget-and-Shell-Scripting

# URL to screenscrape
cwc2011http='m.yahoo.com/w/cricket/'

# Screenscrape
wget -q  -O - $cwc2011http  | sed 's/.*Match/Match No :/' | sed 's/<img src/\n<img src /' | sed 's/negative\"\>/negative\"\>\n/'  | sed 's/<[^>]*>//g;s/^[ \t]*//;/^$/d'| sed 's/Headlines.*//'
Could anybody please help?


EDIT: sorry everyone, i got it working. The problem was my path. I gave it as MyDocs/so/and/so. I changed it to /home/user/MyDocs/so/and/so and now it is working!
__________________
My Device History:Nokia 3510 > SE T230 > Nokia 6600 > HP2210 > SE p910i > SE p990i > N95 > I-mate 9502 > itouch > Nokia N900 > ? N9
My apps for N900:
Conversation Modder

My apps for N9:
LockScreenQuotes
USbS


If you feel I have helped you, don't forget to press Thanks!
 

The Following User Says Thank You to ejasmudar For This Useful Post: