Thank you for that Don You are a star Worked like a charm.
The reason I used "awk" as I have a script that removes printers (code below) & that worked fine. So I was kinda of scratching my head so to speak.
There is an extra space in line 3.
I'm not sure what "There is an extra space in line 3." is referring to.
Note that awk is a fairly expensive program to use this way. Since read is a shell built-in, it is usually faster and uses fewer system resources to do the above with something like the previous example:
Note that I use the name junk for variables used by read for fields that I won't be using later as a convention to make it clear that I don't care what is in those fields. Some people use a variable named ignore, x, or _ for this. The name isn't important; just use something that makes it clear to you (when you look at this code again a year from now) what is being done.
This User Gave Thanks to Don Cragun For This Post:
I have to do a directory clean up on several machines. The task is as follows:
go to a particular directory (cd /xxx)
1. create a directory ' SCRIPTCLEANUP ' ( i KNOW IT)
loop through
2. List the directory
3. if directory and start with 'DQA' leave it,
4. if directory or file move it to... (0 Replies)
I have a script which would monitor a given directory and delete any files which are older than 10 days. I was going to set the 10 crob jobs to perform this operation for 10 different directories (some are actually sub-directories), but my boss doesn't like that idea, so I need to do that in one... (1 Reply)
I need to know how I would be able to clean out the trash can of a single "dumb" user every time the MAC is turned on.
Back ground.
OS 10.3x
G3 Mac
Two users configured...
1) Root or Admin (superuser)
2) student (Simple no access to anything but shared folder for files etc.)
The problem... (4 Replies)
Hello guys,
this script partially works but it's still pretty ugly and, moreover, if the month is jan/feb/mar... it doesn't work at all.
Could anyone say me how to correct, cut and clean a little bit?
#!/usr/bin/ksh
egrep -v -e "^\s*#" /file/permission | awk '{ print $1 }' | sort | uniq... (3 Replies)
Hi,
nevermind. I think I've found the answer. It appears I was looking for index, match, sub, and gsub.
I want to write a shell script that will clean the html out of a bunch of files and format the data for import into excel.
Awk seems like a powerful tool, but it seems oriented to... (1 Reply)
Hi i need a unix script to do the following tasks.
My folder structure is /home/MSTR/test and will have the following folder within it
Cache
Lookup
Source
Target
1. On the Source & Target folder i have to take a copy of files older than 5 days and move(FTP) it into local machines C:\Backup... (1 Reply)
Hi,
I would like to clean up by unix mail mail box thru some script command.. I do know how to delete from mail box ...
e.g.
$ mail
? d*
? quit
But I need to clean up thru some command which I can use in my script before sending any email..
Thanks in advance! (1 Reply)
Hello All,
I need a script that would delete files which are more than "X" number of days old, also if there can be a log file of the deleted files for reference.
I am from windows background hence finding it difficult. Any help is much appreciated
Regards
Wert (4 Replies)
In the f1 file below I am trying to clean it up removing lines the have _tn_ in them. Next, removing the characters in $2 before the ninth /. Then I remove the ID_(digit- always 4). Finally, the charcters after and including the first _. It is curently doing most of it but the cut is removing $1... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT DEBIAN
iwevent
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)