Sponsored Content
Top Forums Shell Programming and Scripting shell script for conky getting errors.... Post 302588124 by ahamed101 on Friday 6th of January 2012 10:39:13 PM
Old 01-06-2012
I assume you want the Signal Level?

My iwconfig has values separated by "=".
Code:
root@bt > iwconfig wlan0|grep 'Link Quality=' 
          Link Quality=56/70  Signal level=-54 dBm

So, the following statement gives me the Signal Strength
Code:
iwconfig wlan0|grep 'Link Quality=' | grep --max-count=1 -o '\=\([0-9]\+\)' | grep --max-count=1 -o '\([0-9]\+\)'
60

If the above does not work, paste the output of iwconfig wlan0

Try this also...
For Signal Level
Code:
root@bt > iwconfig wlan0 | sed -n 's/.*Signal level[:=]-\([0-9]*\).*/\1/gp'
56

Usage in your script would be
Code:
lp=$( iwconfig wlan0 | sed -n 's/.*Signal level[:=]-\([0-9]*\).*/\1/gp' )

--ahamed

Last edited by ahamed101; 01-06-2012 at 11:46 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Showing errors when connecting to sqlplus in shell script

hi, I am trying to automate the compilation of procedures stored in .sql files in Unix. Is there any way in which we can sho err if there errors are raised in the compilation? I am using the following code to connect to the sqlplus sqlplus ${SQL_USER}/${SQL_PASSWORD} (5 Replies)
Discussion started by: silas.john
5 Replies

2. Shell Programming and Scripting

Parse for errors shell script

All, I have a shell script which parses the /var/adm/messages file for errors every 15 minutes as a cron job. The script runs at 01, 16, 31, and 46 minutes every hour. The problem is if the error is encountered any time during the beginning of hour I can get paged three times. I would like to... (2 Replies)
Discussion started by: bubba112557
2 Replies

3. Shell Programming and Scripting

Help with shell script errors

hey watsup guys i am new in the shell script world. so i need help fom you guys, i have written these two codes and they both give the same errors( expr : syntax error). Code 1 : #! /bin/sh # count1 appends an increment to a file 200 times # note that a file called numbers must be... (5 Replies)
Discussion started by: surubi_abada
5 Replies

4. Shell Programming and Scripting

Bad substitution errors in shell script

Hello, I was hoping for a second pair of eyes or a little bit of help figuring out what my error is in a script. I did some searching in the forums and didn't find anything so please forgive me if it a similar problem has been discussed before. My script accepts normal user arguments; however,... (2 Replies)
Discussion started by: Jackinthemox
2 Replies

5. Shell Programming and Scripting

Capture makefile errors in shell script

Hi, I have a bash script which calls a few "make". I would like to know whether the makefile failed with any errors. How do I do that in the script? Thanks, S (2 Replies)
Discussion started by: suryaemlinux
2 Replies

6. Emergency UNIX and Linux Support

Seek help on shell script syntax errors

I want to delete archivelog files that has been archived and applied from primary database to standby database. This piece of script is working in Linux server. However, I copy it to Unix server with tiny modification. It won't work and generate the error message. I have checked code carefullt... (8 Replies)
Discussion started by: duke0001
8 Replies

7. UNIX for Dummies Questions & Answers

Invalid option errors running shell script

The script below fails with the following error messages: gzip: invalid option -- 'w' Try `gzip --help' for more information. mysqldump: Got errno 32 on write cp: invalid option -- 'w' Try `cp --help' for more information. rm: invalid option -- 'w' Try `rm --help' for more information. ... (1 Reply)
Discussion started by: ANNACTION
1 Replies

8. UNIX for Dummies Questions & Answers

Interpreting Shell Script errors when called from CRON

Hi All, I am calling a series of shell scripts via CRON so everything is running as root. However, in my error log file I am seeing the following errors. Please can anyone offer any advise as to the possible causes and solution to prevent the errors from appearing. The Error 1227 seems to... (2 Replies)
Discussion started by: daveu7
2 Replies

9. Shell Programming and Scripting

How to turn off ora errors in shell script?

I have a shell script which select total count from a table and use its value in a if condition like below connect_string="username/password@tnsname" tot=`sqlplus -s $connect_string << EOF set echo off set feedback off set head off select count(*) from test_table; EOF ` if then echo... (2 Replies)
Discussion started by: vel4ever
2 Replies

10. Shell Programming and Scripting

Errors in if condition validations-Shell Script

Hello All, i am facing difficulty in validating the values, kindly help me in resolving the issue. Thanks a lot in advance. -Chandra Script:Test.sh #! /bin/sh # *************************************************************************** # Function to display help function usage()... (1 Reply)
Discussion started by: duddukuri
1 Replies
IWEVENT(8)						     Linux Programmer's Manual							IWEVENT(8)

NAME
iwevent - Display Wireless Events generated by drivers and setting changes SYNOPSIS
iwevent DESCRIPTION
iwevent displays Wireless Events received through the RTNetlink socket. Each line displays the specific Wireless Event which describes what has happened on the specified wireless interface. This command doesn't take any arguments. DISPLAY
There are two classes of Wireless Events. The first class is events related to a change of wireless settings on the interface (typically done through iwconfig or a script calling iwconfig). Only settings that could result in a disruption of connectivity are reported. The events currently reported are changing one of the following setting : Network ID ESSID Frequency Mode Encryption All those events will be generated on all wireless interfaces by the kernel wireless subsystem (but only if the driver has been converted to the new driver API). The second class of events are events generated by the hardware, when something happens or a task has been finished. Those events include : New Access Point/Cell address The interface has joined a new Access Point or Ad-Hoc Cell, or lost its association with it. This is the same address that is reported by iwconfig. Scan request completed A scanning request has been completed, results of the scan are available (see iwlist). Tx packet dropped A packet directed at this address has been dropped because the interface believes this node doesn't answer anymore (usually maximum of MAC level retry exceeded). This is usually an early indication that the node may have left the cell or gone out of range, but it may be due to fading or excessive contention. Custom driver event Event specific to the driver. Please check the driver documentation. Registered node The interface has successfully registered a new wireless client/peer. Will be generated mostly when the interface acts as an Access Point (mode Master). Expired node The registration of the client/peer on this interface has expired. Will be generated mostly when the interface acts as an Access Point (mode Master). Spy threshold crossed The signal strength for one of the addresses in the spy list went under the low threshold or went above the high threshold. Most wireless drivers generate only a subset of those events, not all of them, the exact list depends on the specific hardware/driver com- bination. Please refer to driver documentation for details on when they are generated, and use iwlist(8) to check what the driver supports. AUTHOR
Jean Tourrilhes - jt@hpl.hp.com SEE ALSO
iwconfig(8), iwlist(8), iwspy(8), iwpriv(8), wireless(7). net-tools 23 June 2004 IWEVENT(8)
All times are GMT -4. The time now is 03:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy