LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-20-2007, 10:20 PM   #1
adnanm
Member
 
Registered: Dec 2004
Location: Bosnia and Herzegowina
Distribution: Centos, FreeBSD
Posts: 49

Rep: Reputation: 15
uptime sh script


Hello,

I have the following sh script:
Code:
#!/bin/sh
MYVAR=`uptime`
curl www.mydomain.com/test.php?uptime=$MYVAR
When I execute it I get errors:

Code:
curl: (6) Couldn't resolve host '05:19'
curl: (6) Couldn't resolve host 'up'
curl: (7) Failed to connect to 0.0.0.4: Invalid argument
curl: (6) Couldn't resolve host 'days,'
curl: (6) Couldn't resolve host '8:27,'
curl: (7) Failed to connect to 0.0.0.1: Invalid argument
curl: (6) Couldn't resolve host 'user,'
curl: (6) Couldn't resolve host 'load'
curl: (6) Couldn't resolve host 'average:'
curl: (6) Couldn't resolve host '0.00,'
curl: (6) Couldn't resolve host '0.00,'
curl: (7) Couldn't resolve host '0.00,'
Any ideas?
Adnan
 
Old 04-20-2007, 10:39 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
You forgot the protocol on the url (http://, ftp://).
 
  


Reply

Tags
script, sh, shell, uptime


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uptime: 2.4 vs 2.6 Synesthesia Linux - General 4 10-17-2005 03:23 PM
Linux uptime script.. billeman Linux - Software 1 09-19-2005 11:11 AM
24/7 uptime? jollyjoice General 20 01-25-2005 11:12 AM
uptime skate Linux - Software 16 08-14-2003 03:10 AM
'uptime' bash script icyfire Linux - Software 4 01-10-2003 05:53 AM


All times are GMT -5. The time now is 12:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration