Sponsored Content
Top Forums Shell Programming and Scripting AWK question in the KORN shell Post 61778 by Ygor on Tuesday 8th of February 2005 03:38:51 PM
Old 02-08-2005
I am checking that the return value from getline is greater than zero.

This quote is from: http://www.cs.uu.nl/docs/vakken/st/n..._25.html#SEC28
Quote:
getline returns 1 if it finds a record, and 0 if the end of the file is encountered. If there is some error in getting a record, such as a file that cannot be opened, then getline returns -1.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Question about Korn Shell

In Korn Shell, can you use "go to" statements? Would you then put paragraph names with a colon? For example, would you specify "goto para1" and then have the paragraph with the label para1:? I am getting an error message when Idid this. I have my paragraph name 'clsbooks:' and I get... (13 Replies)
Discussion started by: Latha Nair
13 Replies

2. Shell Programming and Scripting

Korn Shell Loop question

I'm needing help with assigning variables inside a while loop of ksh script. I have an input text file and ksh script below and I'm trying to create a script which will read the input file line by line, assign first and second word to variables and process the variables according to the contents. ... (4 Replies)
Discussion started by: stevefox
4 Replies

3. Shell Programming and Scripting

Korn Shell Coprocess Performance Question

I am wracking my brains over this. I am trying to use a Korn Shell script to execute an Oracle PL/SQL procedure, using the Oracle command line interface (sqlplus). The script starts sqlplus in a coprocess, and the two processes communicate using a two-way pipe. The bgnice option is off, so both... (8 Replies)
Discussion started by: Mark Puddephat
8 Replies

4. Shell Programming and Scripting

korn shell question

Hi all, I am trying to tweak my ksh , i am running V: Version M-11/16/88i I have my Backspace and up/down arrows working using the following code in my ~/.profile file. set -o emacs alias __A=$(print '\020' ) alias __B=$(print '\016' ) alias __C=$(print '\006' ) alias __D=$(print... (4 Replies)
Discussion started by: mich_elle
4 Replies

5. Shell Programming and Scripting

Korn shell and awk question

I am modifying a Korn shell script in using the Exceed (Solaris 10 environment). My task is to read in a .txt file with dates arranged like this (01-Sep-2006). I am to read each line and take the dates, compare them to a benchmark date and depending on if it is older than the date or the date and... (6 Replies)
Discussion started by: mastachef
6 Replies

6. Shell Programming and Scripting

substr() thru awk Korn Shell Script

Hi, I am new stuff to learn substr() function through awk for writing the Korn shell script. Is there a way to copy from XXXX1234.ABCDEF to XXX1234 file names without changing both data files? I appreciate your time to response this email. Thanks, Steve (4 Replies)
Discussion started by: sbryant
4 Replies

7. Shell Programming and Scripting

Could someone give me an example of awk accessing array defined in Korn Shell?

As per title and much apprecieated! (2 Replies)
Discussion started by: biglau
2 Replies

8. UNIX for Dummies Questions & Answers

Korn shell awk use for updating two files

Hi, I have two text files containing records in following format: file1 format is: name1 age1 nickname1 path1 name2 age2 nickname2 path2 file 1 example is: abcd 13 abcd.13 /home/temp/abcd.13 efgh 15 efgh.15 /home/temp/new/efgh.15 (4 Replies)
Discussion started by: alrinno
4 Replies

9. AIX

AIX 4.2 Korn shell and grep question

Ho do I find out the verion of the Kron shell on my client`s system ? There is no one to ask. They are not knowledged enough (hard to believe but yes). Also, on that AIX 4.2, I am trying to figure out how to do a grep using a search patter like below but does not seam to work. The '*' do... (11 Replies)
Discussion started by: Browser_ice
11 Replies

10. Shell Programming and Scripting

korn shell remove files question

how do you show each filename in a giving directory and delete the specific file in korn script i was thinking using ls rm ? but i cant make it work (0 Replies)
Discussion started by: babuda0059
0 Replies
WLANCTL(8)						    BSD System Manager's Manual 						WLANCTL(8)

NAME
wlanctl -- examine IEEE 802.11 wireless LAN client/peer table SYNOPSIS
wlanctl [-p] interface [...] wlanctl [-p] -a DESCRIPTION
Use the wlanctl utility to print node tables from IEEE 802.11 interfaces. Use the -a flag to print the nodes for all interfaces, or list one or more 802.11 interfaces to select their tables for examination. The -p flag causes only nodes that do not have encryption enabled to be printed. For example, to examine the node tables for atw0, use: wlanctl atw0 wlanctl may print this node table, for example: atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e node flags 0001<bss> ess <netbsd> chan 11 freq 2462MHz flags 00a0<cck,2.4GHz> capabilities 0022<ibss,short preamble> beacon-interval 100 TU tsft 18425852102545544165 us rates [1.0] 2.0 5.5 11.0 assoc-id 0 assoc-failed 0 inactivity 0s rssi 161 txseq 10 rxseq 1420 atw0: mac 00:02:2d:2e:3c:f4 bss 02:02:6f:20:f6:2e node flags 0000 ess <netbsd> chan 11 freq 2462MHz flags 00a0<cck,2.4GHz> capabilities 0002<ibss> beacon-interval 100 TU tsft 18425852105450086784 us rates [1.0] 2.0 5.5 11.0 assoc-id 0 assoc-failed 0 inactivity 0s rssi 159 txseq 2 rxseq 551 atw0: mac 00:02:6f:20:f6:2e bss 02:02:6f:20:f6:2e node flags 0000 ess <netbsd> chan 11 freq 2462MHz flags 00a0<cck,2.4GHz> capabilities 0022<ibss,short preamble> beacon-interval 100 TU tsft 18425852102558548069 us rates [1.0] 2.0 5.5 6.0 9.0 11.0 12.0 18.0 24.0 36.0 48.0 54.0 assoc-id 0 assoc-failed 0 inactivity 145s rssi 163 txseq 9 rxseq 2563 This example is taken from a network consisting of three stations running in ad hoc mode. The key for interpreting the node print-outs fol- lows: mac In the example node table, the first network node has MAC number 00:02:6f:20:f6:2e. bss The first node belongs to the 802.11 network identified by Basic Service Set Identifier (BSSID) 02:02:6f:20:f6:2e. node flags Only three node flags, ``bss'', ``sta'', and ``scan'', are presently defined. The first node is distinguished from the rest by its node flags: flag ``bss'' indicates that the node represents the 802.11 network that the interface has joined or created. The MAC number for the node is the same as the MAC number for the interface. ess the name of the (Extended) Service Set we have joined. This is the same as the network name set by ifconfig(8) with the ``ssid'' option. chan wlanctl prints the channel number, the center frequency in megahertz, and the channel flags. The channel flags indicate the frequency band (``2.4GHz'' or ``5GHz''), modulation (``cck'', ``gfsk'', ``ofdm'', ``turbo'', and ``dynamic cck-ofdm''), and operation constraints (``passive scan''). Common combinations of band and modulation are these: Band Modulation Description 2.4GHz cck 11Mb/s DSSS 802.11b 2.4GHz gfsk 1-2Mb/s FHSS 802.11 2.4GHz ofdm 54Mb/s 802.11g 2.4GHz dynamic cck-ofdm mixed 802.11b/g network 5GHz ofdm 54Mb/s 802.11a 5GHz turbo 108Mb/s 802.11a capabilities ad hoc-mode and AP-mode 802.11 stations advertise their capabilities in 802.11 Beacons and Probe Responses. wlanctl under- stands these capability flags: Flag Description ess infrastructure (access point) network ibss ad hoc network (no access point) cf pollable TBD request cf poll TBD privacy WEP encryption short preamble reduce 802.11b overhead pbcc 22Mbps ``802.11b+'' channel agility change channel for licensed services short slot-time TBD rsn TBD Real Soon Now dsss-ofdm TBD beacon-interval In the example, beacons are sent once every 100 Time Units. A Time Unit (TU) is 1024 microseconds (a ``kilo-microsecond'' or ``kus''). Thus 100 TU is about one tenth of a second. tsft 802.11 stations keep a Time Synchronization Function Timer (TSFT) which counts up in microseconds. Ad hoc-mode stations syn- chronize time with their peers. Infrastructure-mode stations synchronize time with their access point. Power-saving stations wake and sleep at intervals measured by the TSF Timer. The TSF Timer has a role in the coalescence of 802.11 ad hoc networks (``IBSS merges''). rates 802.11 stations indicate the bit-rates they support, in units of 100kb/s in 802.11 Beacons, Probe Responses, and Association Requests. wlanctl prints a station's supported bit-rates in 1Mb/s units. A station's basic rates are flagged by an asterisk ('*'). The last bit-rate at which a packet was sent to the station is enclosed by square brackets. assoc-id In an infrastructure network, the access point assigns each client an Association Identifier which is used to indicate traffic for power-saving stations. assoc-failed The number of times the station tried and failed to associate with its access point. Only inactivity Seconds elapsed since a packet was last received from the station. When this value reaches net.link.ieee80211.maxinact, the station is eligible to be purged from the node table. See sysctl(8). rssi Unitless Received Signal Strength Indication (RSSI). Higher numbers indicate stronger signals. Zero is the lowest possible RSSI. On a hostap- or adhoc-mode interface, the node with node flag ``bss'' set uses rssi to indicate the signal strength for the last packet received from a station that does not belong to the network. On an infrastructure-mode station, the node with node flag ``bss'' set indicates the strength of packets from the access point. txseq The next 802.11 packet sent to this station will carry this transmit sequence number. The 802.11 MAC uses the transmit sequence number to detect duplicate packets. rxseq The last packet received from this station carried this transmit sequence number. SEE ALSO
sysctl(8) HISTORY
wlanctl first appeared in NetBSD 3.0. AUTHORS
David Young <dyoung@NetBSD.org> BSD
July 15, 2004 BSD
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy