•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 403,098 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,132 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 2413 | Replies: 9
![]() |
•
•
Join Date: May 2005
Posts: 215
Reputation:
Rep Power: 4
Solved Threads: 0
before even writing a scripts you need a program(command) to get the source code. for instance this will download the soucecode of a page
this will only work because it is an html file it is getting.
this technique will not work with
because there is no html file to download.
The whole process of getting the html source code might be tricky
wget http://www.daniweb.com/techtalkforums/thread7215.html
this technique will not work with
wget http://www.daniweb.com
The whole process of getting the html source code might be tricky
•
•
Join Date: Jul 2005
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
Originally Posted by shanenin
before even writing a scripts you need a program(command) to get the source code. for instance this will download the soucecode of a page
this will only work because it is an html file it is getting.wget http://www.daniweb.com/techtalkforums/thread7215.html
this technique will not work with
because there is no html file to download.wget http://www.daniweb.com
The whole process of getting the html source code might be tricky
Actually im Passing value to a url:
here is what i want to do , im passing a phone number to the url
http://www.whitepages.com/1014/log_c...e_Phone?phone=
and after passing argument the result page content must be dumped in to a file.
so that i grep some content from the file
can u help me
•
•
Join Date: May 2005
Posts: 215
Reputation:
Rep Power: 4
Solved Threads: 0
you can do it with a program called links, it is a text web browser. this code will substitute the number given, then put the code into a file called temp
if you want just the output of the page, instead of the full source code use the -dump option instaed of the -source option. This is a lot cleaner and less stuff to look through.
here is a link to the needed program. It may be installed by defualt in most linux sytems.
http://artax.karlin.mff.cuni.cz/~mikulas/links/
#!/bin/bash echo "enter the phone number to search for" read NUMBER /usr/bin/links -source http://www.whitepages.com/10001/search/Reverse_Phone?phone=$NUMBER > temp
if you want just the output of the page, instead of the full source code use the -dump option instaed of the -source option. This is a lot cleaner and less stuff to look through.
here is a link to the needed program. It may be installed by defualt in most linux sytems.
http://artax.karlin.mff.cuni.cz/~mikulas/links/
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: New to shell script
- Next Thread: Script use command mail


Linear Mode