LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2005, 10:07 AM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 518

Rep: Reputation: 32
open a URL from shell


I'm looking to open a URL and then dump any and all output including errors to /dev/null

What I was planning to do was run lynx ***.***.***.***/page.html >/dev/null 2> /dev/null

However I find this gives a segmentation fault.
I dont want to run it and place it in the background either as it will still remain at that page and obviously lynx will remains running. Perhaps if there is a way of killing the instance of lynx after it has performed the above task, from within my script ofcourse???

Any suggestions?

Basically, this is to reboot my router from my server, I do a few checks, if I can't ping the outside world, then I run this to reboot it.

Thanks in advance...
 
Old 11-09-2005, 02:54 AM   #2
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Why not something like this?
Code:
wget http://mysite.com/mypage.html -O /dev/null
 
Old 11-09-2005, 02:47 PM   #3
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 518

Original Poster
Rep: Reputation: 32
This works, for some reason I thought I would have to use lynx as wget would only retrieve the file and I wished it to be executed, however it now works a treat.

My system now recovers from a loss in internet connectivity without any intervention from me...
 
Old 11-10-2005, 01:43 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Glad I could help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open a url in c++ bertlef Programming 2 01-07-2005 04:27 PM
Can't open URL links in Thunderbird unixfreak Linux - Newbie 4 10-18-2004 11:00 AM
It's so slow to open a url j.vilon Debian 12 10-04-2004 12:32 PM
how to use php open and url antony_csf Programming 7 09-27-2004 12:54 AM
KDE open URL from desktop kris.kj.jacobs Linux - Networking 3 06-11-2001 12:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration