Sponsored Content
Top Forums Shell Programming and Scripting Last column data using condition Post 302699447 by asavaliya on Tuesday 11th of September 2012 05:14:29 PM
Old 09-11-2012
MySQL Last column data using condition

Input:-A

Code:
A02 A02_1 5780 23780
A02 A02_1 5780 23780
A02 A02_1 5780 23780
A02 A02_1 134 2
A02 A02_1 134 0
A02 A02_1 134 1
A03 A03_1 5780 23080
A03 A03_1 5780 23080
A03 A03_1 5780 23080
A03 A03_1 34 2
A03 A03_1 34 0
A03 A03_1 34 1

Output:-B

Code:
A02 A02_1 134 2
A02 A02_1 134 0
A02 A02_1 134 1
A03 A03_1 34 2
A03 A03_1 34 0
A03 A03_1 34 1

I want data which have 0 or 1 or 2 in column 4

Also it is possible to cut data from that file A.

So File A:

Code:
A02 A02_1 5780 23780
A02 A02_1 5780 23780
A02 A02_1 5780 23780
A03 A03_1 5780 23080
A03 A03_1 5780 23080
A03 A03_1 5780 23080

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sum of column with condition

1 IT 50 2 IT 40 3 Finance 200 4 MP 30 5 MP 10 6 HQ 30 how to use awk to make it display it like this IT 90 MP 40 HQ 30 Finance 200 (1 Reply)
Discussion started by: minwei86
1 Replies

2. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

3. Shell Programming and Scripting

to add special tag to a column based on column condition

Hi All, I have following html code <TR><TD>9</TD><TD>AR_TVR_TBS </TD><TD>85000</TD><TD>39938</TD><TD>54212</TD><TD>46</TD></TR> <TR><TD>10</TD><TD>ASCV_SMY_TBS </TD><TD>69880</TD><TD>33316</TD><TD>45698</TD><TD>47</TD></TR> <TR><TD>11</TD><TD>ARC_TBS ... (9 Replies)
Discussion started by: ckwan
9 Replies

4. Shell Programming and Scripting

Replace column that matches specific pattern, with column data from another file

Can anyone please help with this? I have 2 files as given below. If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value. file1 abc_1 foo1@a .... abc_1 soo2@a ... def_2 soo2@a .... def_2 foo1@a ........ (7 Replies)
Discussion started by: prashali
7 Replies

5. Shell Programming and Scripting

Compare 2 files and match column data and align data from 3 column

Hello experts, Please help me in achieving this in an easier way possible. I have 2 csv files with following data: File1 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:36:09,JOB_5340 08/23/2012 12:36:14,JOB_5340 08/23/2012 12:36:22,JOB_5350 08/23/2012... (5 Replies)
Discussion started by: asnandhakumar
5 Replies

6. Shell Programming and Scripting

Sum Of Column Based On Column Condition

I have a following inputfile MT,AP,CDM,TTML,MUM,GS,SUCC,3 MT,AP,CDM,TTSL,AP,GS,FAIL,9 MT,AP,CDM,RCom,MAH,GS,SUCC,3 MT,AP,CDM,RTL,HP,GS,SUCC,1 MT,AP,CDM,Uni,UPE,GS,SUCC,2 MT,AP,CDM,Uni,MUM,GS,SUCC,2 TTSL,AP,GS,MT,MAH,CDM,SUCC,20 TTML,AP,GS,MT,MAH,CDM,FAIL,10... (2 Replies)
Discussion started by: siramitsharma
2 Replies

7. Shell Programming and Scripting

Insert data in first column(if blank) from previous line first column

Dear Team I need to insert field(which is need to taken from previous line's first field) in first column if its blank. I had tried using sed but not find the way. Detail input and output file as below. Kindly help for same. INPUT: SCGR SC DEV DEV1 NUMDEV DCP ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

8. Shell Programming and Scripting

Check first column - average second column based on a condition

Hi, My input file Gene1 1 Gene1 2 Gene1 3 Gene1 0 Gene2 0 Gene2 0 Gene2 4 Gene2 8 Gene3 9 Gene3 9 Gene4 0 Condition: If the first column matches, then look in the second column. If there is a value of zero in the second column, then don't consider that record while averaging. ... (5 Replies)
Discussion started by: jacobs.smith
5 Replies

9. Shell Programming and Scripting

Change data in one column with data from another file's column

Hello, I have this file outputData: # cat /tmp/outputData __Capacity^6^NBSC01_Licences^L3_functionality_for_ESB_switch __Capacity^2100^NBSC01_Licences^Gb_over_IP __Capacity^1837^NBSC01_Licences^EDGE_BSS_Fnc __Capacity^1816^NBSC01_Licences^GPRS_CS3_and_CS4... (1 Reply)
Discussion started by: nypreH
1 Replies

10. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
RAL(4)							   BSD Kernel Interfaces Manual 						    RAL(4)

NAME
ral -- Ralink Technology IEEE 802.11 wireless network driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device ral device ralfw device wlan device wlan_amrr device firmware Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_ral_load="YES" DESCRIPTION
The ral driver supports PCI/CardBus wireless adapters based on the Ralink Technology RT2500, RT2501, and RT2600 chipsets. The RT2500 chipset is the first generation of 802.11b/g adapters from Ralink. It consists of two integrated chips, a RT2560 MAC/BBP and a RT2525 radio transceiver. The RT2501 chipset is the second generation of 802.11b/g adapters from Ralink. It consists of two integrated chips, a RT2561 MAC/BBP and a RT2527 radio transceiver. This chipset provides support for the IEEE 802.11e standard with multiple hardware transmission queues and allows scatter/gather for efficient DMA operations. The RT2600 chipset consists of two integrated chips, a RT2661 MAC/BBP and a RT2529 radio transceiver. This chipset uses the MIMO (multiple- input multiple-output) technology with multiple antennas to extend the operating range of the adapter and to achieve higher throughput. MIMO is the basis of the forthcoming IEEE 802.11n standard. The transmit speed is user-selectable or can be adapted automatically by the driver depending on the received signal strength and on the num- ber of hardware transmission retries. ral supports station, adhoc, hostap, mesh, wds, and monitor mode operation. Only one hostap or mesh virtual interface may be configured at a time. Any number of wds virtual interfaces may be configured together with a hostap interface. Multiple station interfaces may be operated together with a hostap interface to construct a wireless repeater device. For more information on configuring this device, see ifconfig(8). HARDWARE
The ral driver supports PCI/CardBus wireless adapters based on the Ralink Technology RT2500, RT2501, and RT2600 chipsets, including: Card MAC/BBP Bus A-Link WL54H RT2560 PCI A-Link WL54PC RT2560 CardBus AirLink101 AWLC5025 RT2661 CardBus AirLink101 AWLH5025 RT2661 PCI Amigo AWI-914W RT2560 CardBus Amigo AWI-922W RT2560 mini-PCI Amigo AWI-926W RT2560 PCI AMIT WL531C RT2560 CardBus AMIT WL531P RT2560 PCI AOpen AOI-831 RT2560 PCI ASUS WL-107G RT2560 CardBus ASUS WL-130g RT2560 PCI Atlantis Land A02-PCI-W54 RT2560 PCI Atlantis Land A02-PCM-W54 RT2560 CardBus Belkin F5D7000 v3 RT2560 PCI Belkin F5D7010 v2 RT2560 CardBus Billionton MIWLGRL RT2560 mini-PCI Canyon CN-WF511 RT2560 PCI Canyon CN-WF513 RT2560 CardBus CC&C WL-2102 RT2560 CardBus CNet CWC-854 RT2560 CardBus CNet CWP-854 RT2560 PCI Compex WL54G RT2560 CardBus Compex WLP54G RT2560 PCI Conceptronic C54RC RT2560 CardBus Conceptronic C54Ri RT2560 PCI Digitus DN-7001G-RA RT2560 CardBus Digitus DN-7006G-RA RT2560 PCI E-Tech WGPC02 RT2560 CardBus E-Tech WGPI02 RT2560 PCI Edimax EW-7108PCg RT2560 CardBus Edimax EW-7128g RT2560 PCI Eminent EM3036 RT2560 CardBus Eminent EM3037 RT2560 PCI Encore ENLWI-G-RLAM RT2560 PCI Encore ENPWI-G-RLAM RT2560 CardBus Fiberline WL-400P RT2560 PCI Fibreline WL-400X RT2560 CardBus Gigabyte GN-WI01GS RT2561S mini-PCI Gigabyte GN-WIKG RT2560 mini-PCI Gigabyte GN-WMKG RT2560 CardBus Gigabyte GN-WP01GS RT2561S PCI Gigabyte GN-WPKG RT2560 PCI Hawking HWC54GR RT2560 CardBus Hawking HWP54GR RT2560 PCI iNexQ CR054g-009 (R03) RT2560 PCI JAHT WN-4054P RT2560 CardBus JAHT WN-4054PCI RT2560 PCI LevelOne WNC-0301 v2 RT2560 PCI LevelOne WPC-0301 v2 RT2560 CardBus Linksys WMP54G v4 RT2560 PCI Micronet SP906GK RT2560 PCI Micronet SP908GK V3 RT2560 CardBus Minitar MN54GCB-R RT2560 CardBus Minitar MN54GPC-R RT2560 PCI MSI CB54G2 RT2560 CardBus MSI MP54G2 RT2560 mini-PCI MSI PC54G2 RT2560 PCI OvisLink EVO-W54PCI RT2560 PCI PheeNet HWL-PCIG/RA RT2560 PCI Pro-Nets CB80211G RT2560 CardBus Pro-Nets PC80211G RT2560 PCI Repotec RP-WB7108 RT2560 CardBus Repotec RP-WP0854 RT2560 PCI SATech SN-54C RT2560 CardBus SATech SN-54P RT2560 PCI Sitecom WL-112 RT2560 CardBus Sitecom WL-115 RT2560 PCI SMC SMCWCB-GM RT2661 CardBus SMC SMCWPCI-GM RT2661 PCI SparkLAN WL-685R RT2560 CardBus Surecom EP-9321-g RT2560 PCI Surecom EP-9321-g1 RT2560 PCI Surecom EP-9428-g RT2560 CardBus Sweex LC500050 RT2560 CardBus Sweex LC700030 RT2560 PCI TekComm NE-9321-g RT2560 PCI TekComm NE-9428-g RT2560 CardBus Unex CR054g-R02 RT2560 PCI Unex MR054g-R02 RT2560 CardBus Zinwell ZWX-G160 RT2560 CardBus Zinwell ZWX-G360 RT2560 mini-PCI Zinwell ZWX-G361 RT2560 PCI Zonet ZEW1500 RT2560 CardBus Zonet ZEW1600 RT2560 PCI An up to date list can be found at http://damien.bergamini.free.fr/ral/list.html. EXAMPLES
Join an existing BSS network (i.e., connect to an access point): ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00 Join a specific BSS network with network name ``my_net'': ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net Join a specific BSS network with 40-bit WEP encryption: ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net wepmode on wepkey 0x1234567890 weptxkey 1 Join a specific BSS network with 104-bit WEP encryption: ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask 0xffffff00 ssid my_net wepmode on wepkey 0x01020304050607080910111213 weptxkey 1 DIAGNOSTICS
ral%d: could not load 8051 microcode An error occurred while attempting to upload the microcode to the onboard 8051 microcontroller unit. ral%d: timeout waiting for MCU to initialize The onboard 8051 microcontroller unit failed to initialize in time. ral%d: device timeout A frame dispatched to the hardware for transmission did not complete in time. The driver will reset the hardware. This should not happen. SEE ALSO
intro(4), cardbus(4), wlan(4), wlan_ccmp(4), wlan_tkip(4), wlan_wep(4), wlan_xauth(4), hostapd(8), ifconfig(8), wpa_supplicant(8). Ralink Technology, http://www.ralinktech.com/. HISTORY
The ral driver first appeared in OpenBSD 3.7. AUTHORS
The original ral driver was written by Damien Bergamini <damien@FreeBSD.org>. BUGS
Host AP mode doesn't support client power save. Clients using power save mode will experience packet loss (disabling power saving on the client will fix this). BSD
July 8, 2009 BSD
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy