09-14-2011
i'm having a hard time understanding the !second{print $0;second=$2;}$2<second{print $0;exit;}' line
.
I want to understand it to tailor it to find 3rd largest maxes with difference greater than 5 (as used in second largest logic), 4th largsest maxes with that same difference, 5th largest, etc. etc.
Thanks for the help so far. I am in unfamiliar territories with awk here.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
1)I have XX directory and have lot of files ,I want to find largest file in that
directory
2)how calculate the size of file in MB.
Thanks,
Mohan (15 Replies)
Discussion started by: mohan705
15 Replies
2. Shell Programming and Scripting
hi,
i am having a file that looks like this :
myhome111
oper
11
myhome333
oper
19
...
how can i get the largest value from this file ..in this example i am consiering 19 as the largest value.. how can i do that.. as this file is having other numbers also within it like 111, 333... (4 Replies)
Discussion started by: kripssmart
4 Replies
3. Shell Programming and Scripting
Hi All,
My file is like this:
$ cat max.txt
abcd:1982:a
efghij:1980:e
klmn:1923:k
opqrst:1982:o
I have to find out the largest first field and the corresponding line. i.e
Output required:
efghij efghij:1980:e
opqrst opqrst:1982:o
HTH,
jkl_jkl (6 Replies)
Discussion started by: jkl_jkl
6 Replies
4. Shell Programming and Scripting
Hello,
i am on linux 2.6.13-1.1526_FC4smp , and i would be very greatfull
if someone could help to find the largest files on that server.
I know i can find files with find command or list them with ls ,
but is there a way that i could list let's say 10 biggest files on server ?
:o (11 Replies)
Discussion started by: tonijel
11 Replies
5. UNIX for Dummies Questions & Answers
My directory only contains files..no sub directories..I want to know about the largest file in directory..Largest in terms of size..And what if I want to know about first 3 largest files..
Is it possible to know largest file in terms of its filename?? (4 Replies)
Discussion started by: aadi_uni
4 Replies
6. Shell Programming and Scripting
Hey,
This is a long-shot however, I am stuck with the following problem:
I have the output from ls -la, and I want to sort some of that data out by using AWK to filter it.
ls -la | awk -f scriptname.awk
Input:
For example:
drwxr-xr-x 3 user users 4096 2010-03-14 20:15 bin/... (5 Replies)
Discussion started by: abciscool
5 Replies
7. Shell Programming and Scripting
Input file
US Score 10
UK Ball 20
AS Score 50
AK Ball 10
PZ Ballon 50
PA Score 70
WT Data 10
.
.
Desired output file
UK Ball 20
PZ Ballon 50
PA Score 70
WT Data 10
.
. (1 Reply)
Discussion started by: perl_beginner
1 Replies
8. UNIX for Dummies Questions & Answers
Hi !
Here is an example of a tab-delimited file with variable width values in field 2 (space separated values).
As the real file contains lot of lines, I can adjust manually the width to the largest value in field 2.
Does it exist an argument to do it automatically?
input.tab:... (4 Replies)
Discussion started by: lucasvs
4 Replies
9. Shell Programming and Scripting
I need to calculate the biggest number in array size n.
Example: Users enter: 1 7 4 9
The biggest number is : 9
Simple but I'm really new on this on Shell/Bash! Anything will be helpful! Thanks!
#!/bin/bash
printf "\tEnter a list of numbers, with spaces: "
read -a ARRAY
BIG=$1... (5 Replies)
Discussion started by: Sundown
5 Replies
10. Shell Programming and Scripting
In the below I am trying to use awk to match all the $13 values in input, which is tab-delimited,
that are in $1 of gene which is just a single column of text.
However only the line with the greatest $9 value in input needs to be printed.
So in the example below all the MECP2 and LTBP1... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT NETBSD
pciide
PCIIDE(4) BSD Kernel Interfaces Manual PCIIDE(4)
NAME
pciide -- PCI IDE disk controllers driver
SYNOPSIS
pciide* at pci? dev ? function ? flags 0x0000
pciide* at pnpbios? index ?
DESCRIPTION
The pciide driver supports the PCI IDE controllers as specified in the "PCI IDE controller specification, revision 1.0" draft, and provides
the interface with the hardware for the ata driver. Please use the chip-specific drivers for the following controllers for enhanced and DMA
support:
- Acard ATP850 (Ultra/33) and ATP860 (Ultra/66) IDE Controllers: acardide(4)
- Acer labs M5229 IDE Controller: aceride(4)
- Advanced Micro Devices AMD-756, 766, and 768 IDE Controllers: viaide(4)
- Advanced Micro Devices Geode IDE Controllers: geodeide(4)
- CMD Tech PCI0643, PCI0646, PCI0648, and PCI0649 IDE Controllers: cmdide(4)
- Contaq Microsystems/Cypress CY82C693 IDE Controller: cypide(4)
- HighPoint HPT366 Ultra/66, HPT370 Ultra/100, HPT372, and HPT374 Ultra/133 IDE controller: hptide(4)
- Intel PIIX, PIIX3, and PIIX4 IDE Controllers: piixide(4)
- Intel i31244 Serial ATA controller: artsata(4)
- Intel 82801 (ICH/ICH0/ICH2/ICH3/ICH4/ICH5/ICH6) IDE Controllers: piixide(4)
- Intel SCH IDE Controllers: schide(4)
- NVIDIA nForce/nForce2 IDE Controllers: viaide(4)
- OPTi 82c621 (plus a few of its derivatives) IDE Controllers: optiide(4)
- Promise PDC20246 (Ultra/33), PDC20262 (Ultra/66), PDC20265/PDC20267 (Ultra100), PDC20268 (Ultra/100TX2 and Ultra/100TX2v2),
Ultra/133, Ultra/133TX2 and Ultra/133TX2v2 PCI IDE controllers: pdcide(4)
- Serverworks K2 SATA controllers: svwsata(4)
- Silicon Image 0680 IDE controller: cmdide(4)
- Silicon Image SATALink 3112 Serial ATA controller: satalink(4)
- Silicon Image SteelVine 3124/3132/3531 Serial ATA II controller: siisata(4)
- Silicon Integrated System 5597/5598 IDE controller: siside(4)
- Symphony Labs 82C105 and Winbond W83C553F IDE controller: slide(4)
- VIA Technologies VT82C586, VT82C586A, VT82C596A, VT82C686A, VT8233A, and VT8235 IDE Controllers: viaide(4)
The 0x0001 flag forces the pciide driver to use DMA when there is no explicit DMA mode setting support for the controller but DMA is present.
If the BIOS didn't set up the controller properly, this can cause a machine hang.
The 0x0002 flag forces the pciide driver to disable DMA on chipsets for which DMA would normally be enabled. This can be used as a debugging
aid, or to work around problems where the IDE controller is wired up to the system incorrectly.
SEE ALSO
acardide(4), aceride(4), artsata(4), ata(4), atapi(4), cmdide(4), cypide(4), geodeide(4), hptide(4), intro(4), optiide(4), pci(4), pdcide(4),
piixide(4), pnpbios(4), satalink(4), schide(4), siisata(4), siside(4), slide(4), viaide(4), wd(4), wdc(4)
BSD
November 7, 2010 BSD