Results 1 to 2 of 2
Hello,
I am trying to get the following script working:
===cut===
#!/bin/sh
# Gets System uptime. $1 is host name
upt='</proc/uptime'
for line in $upt dummy $1
do
echo "$line"
...
- 01-09-2010 #1Linux Newbie
- Join Date
- Dec 2009
- Posts
- 103
[SOLVED] Scripting Question...
Hello,
I am trying to get the following script working:
===cut===
#!/bin/sh
# Gets System uptime. $1 is host name
upt='</proc/uptime'
for line in $upt dummy $1
do
echo "$line"
done
===cut===
I get this output after making it exec and running it:
===cut===
strangelove:/home/dcole# chmod a+x up2mrtg
strangelove:/home/dcole# ./up2mrtg strangelove
</proc/uptime
dummy
strangelove
strangelove:/home/dcole#
===cut===
Any ideas why it is not showing uptime?
Also "more" shows the uptime etc... What am I doing wrong here?
Thanks,
Dave
- 01-09-2010 #2Linux Newbie
- Join Date
- Dec 2009
- Posts
- 103
Solved it myself... Wrong quotes...

Dave


