Register
It is currently Tue Sep 02, 2014 12:51 am

need someone to check script for bugs..new to scripting


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sat Jan 07, 2012 9:21 am   

Joined: Sat Jan 07, 2012 9:16 am
Posts: 1
So I have a script for outputing an image depending on the quality of a wireless signal. My problem is that I cannot get the image to show up on my desktop. I will be honest and say that I do not no much to anything about bash scripting. I am new to this. Could someone please look at the code and tell me what the reasoning is that I cannot get an image to show up on my desktop when the wlanscript.sh is called from .conkyrc

Code:
#! /bin/bash
function dload()
{   
   if [ $lq -le 100 ] && [ $lq -gt 65 ]; then
      echo '${image /home/kris/.images/wlan100.png -s 94x79 -p 10,520}'   
   fi   
   if [ $lq -le 66 ] && [ $lq -gt 55 ]; then   
      echo '${image /home/kris/.images/wlan50.png -s 94x79 -p 100,25}'   
   fi   
   if [ $lq -le 56 ] && [ $lq -gt 49 ]; then   
      echo '${image /home/kris/.images/wlan40.png -s 994x979 -p 10,725}'   
   fi   
   if [ $lq -le 50 ] && [ $lq -gt 5 ]; then   
      echo '${image /home/kris/.images/wlan5.png -s 994x979 -p 0,625}'   
   fi
}

function usage()
{
echo ${image /home/kris/.images/wlan0.png -s 94x79 -p 100,25}
}


lq=$(sudo iwconfig eth1 | sed -n 's/.*Signal level[:=]-\([0-9]*\).*/\1/gp')
"$lq"=lq
if [ $lq -le 5 ]
then
usage
else
dload
fi


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP