Hi all,
anybody can help me in this?
how to catch the output of the URL in scripting.
exmple:
if i give the URL:
http://www.unix.com/shell-programming-scripting/155750-use-sed.html\#post302503291
then output should be in onefile newfile.txt
thanks in advance..
try this
wget http://www.unix.com/shell-programming-scripting/155750-use-sed.html#post302503291 > newfile.txt
Do u need the status of the url???
frans
4
wget -O newfile.txt "http://www.unix.com/shell-programming-scripting/155750-use-sed.html#post302503291"
Notes:
- It's better to quote the string to avoid bad interpretation by the shell.
- The "http://" is subsidiary for wget.
clearly,you need to install wget,if you use ubuntu,you can install it by
sudo apt-get install wget
Installation's similarly in other distributions.
curl is another tool you can use to retrieve the contents of a URL.