Sponsored Content
Full Discussion: Counting entries in a file
Top Forums Shell Programming and Scripting Counting entries in a file Post 302562430 by sajal.bhatia on Thursday 6th of October 2011 10:02:40 PM
Old 10-06-2011
Thanks! I am trying to optimize it as the input files are pretty big (~2GB)

Cheers,
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Counting words in a file

I'm trying to figure out a way to count the number of words in the follwing file: cal 2002 > file1 Is there anyway to do this without using wc but instead using the cut command? (1 Reply)
Discussion started by: r0mulus
1 Replies

2. Shell Programming and Scripting

Help me in counting records from file

Hi, Please help me in counting the below records(1st field) from samplefile: Expected output: Count Descr ------------------------------------------- 7 Mean manager 14 ... (7 Replies)
Discussion started by: prashant43
7 Replies

3. Programming

Counting the words in a file

Please find the below program. It contains the purpose of the program itself. /* Program : Write a program to count the number of words in a given text file */ /* Date : 12-June-2010 */ # include <stdio.h> # include <stdlib.h> # include <string.h> int main( int argc, char *argv ) {... (6 Replies)
Discussion started by: ramkrix
6 Replies

4. Shell Programming and Scripting

Counting multiple entries in a file using awk

Hi, I have a big file (~960MB) having epoch time values (~50 million entries) which looks like 897393601 897393601 897393601 897393601 897393602 897393602 897393602 897393602 897393602 897393603 897393603 897393603 897393603 and so on....each time stamp has more than one... (6 Replies)
Discussion started by: sajal.bhatia
6 Replies

5. Shell Programming and Scripting

Counting duplicate entries in a file using awk

Hi, I have a very big (with around 1 million entries) txt file with IPv4 addresses in the standard format, i.e. a.b.c.d The file looks like 10.1.1.1 10.1.1.1 10.1.1.1 10.1.2.4 10.1.2.4 12.1.5.6 . . . . and so on.... There are duplicate/multiple entries for some IP... (3 Replies)
Discussion started by: sajal.bhatia
3 Replies

6. Shell Programming and Scripting

Counting characters within a file

Ok say I wanted to count every Y in a data file. Then set Y as my delimiter so that I can separate my file by taking all the contents that occur BEFORE the first Y and store them in a variable so that I may use this content later on in my program. Then I could do the same thing with the next Y's... (5 Replies)
Discussion started by: puttster
5 Replies

7. UNIX for Dummies Questions & Answers

Counting feilds entries with Perl

Hi All, I have a small problem of counting the number of times a particular entry that exists in a horizontal string of elements and a vertical feild (column of entries). For example AATGGTCCTGExpected outputA=2 C=2 G=3 T=3 I have an idea to do this but I dont know how to do that if these entries... (1 Reply)
Discussion started by: pawannoel
1 Replies

8. Shell Programming and Scripting

Counting lines in a file using awk

I want to count lines of a file using AWK (only) and not in the END part like this awk 'END{print FNR}' because I want to use it. Does anyone know of a way? Thanks a lot. (7 Replies)
Discussion started by: guitarist684
7 Replies

9. Shell Programming and Scripting

Need help of counting no of column of a file

Hi All , I got stuck on the below scenario.If anyone can help me ,that will be really helpful. I have a target hdfs file layout.I need to know the no of column in that file. Target_RECRD_layout { ABC_ID EN NOTNULLABLE, ABC_COUNTRY CHARACTER ENCODING ASCII NOTNULLABLE, ... (5 Replies)
Discussion started by: STCET22
5 Replies

10. Shell Programming and Scripting

Counting and print from file

Dear community, I have an already filtered log on my machine, something like: WARN 2016.03.10 10:59:01.136 logging.LogAlarmListener raise ALARMWARNINGRAISED Alarm NODE-NetworkAccessGroup.Client.41283 SERVICEDOWN-41283.WC severity WARNING raised: Service 41283.WC protocoltype client is down... (13 Replies)
Discussion started by: Lord Spectre
13 Replies
QwtDoubleInterval(3)						 Qwt User's Guide					      QwtDoubleInterval(3)

NAME
QwtDoubleInterval - A class representing an interval. SYNOPSIS
#include <qwt_double_interval.h> Public Types enum BorderMode { IncludeBorders = 0, ExcludeMinimum = 1, ExcludeMaximum = 2, ExcludeBorders = ExcludeMinimum | ExcludeMaximum } Public Member Functions int borderFlags () const bool contains (double value) const QwtDoubleInterval extend (double value) const QwtDoubleInterval intersect (const QwtDoubleInterval &) const bool intersects (const QwtDoubleInterval &) const void invalidate () QwtDoubleInterval inverted () const bool isNull () const bool isValid () const QwtDoubleInterval limited (double minValue, double maxValue) const double maxValue () const double minValue () const QwtDoubleInterval normalized () const int operator!= (const QwtDoubleInterval &) const QwtDoubleInterval operator& (const QwtDoubleInterval &) const QwtDoubleInterval & operator&= (const QwtDoubleInterval &) int operator== (const QwtDoubleInterval &) const QwtDoubleInterval operator| (double) const QwtDoubleInterval operator| (const QwtDoubleInterval &) const QwtDoubleInterval & operator|= (double) QwtDoubleInterval & operator|= (const QwtDoubleInterval &) QwtDoubleInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) QwtDoubleInterval () void setBorderFlags (int) void setInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) void setMaxValue (double) void setMinValue (double) QwtDoubleInterval symmetrize (double value) const QwtDoubleInterval unite (const QwtDoubleInterval &) const double width () const Detailed Description A class representing an interval. The interval is represented by 2 doubles, the lower and the upper limit. Member Enumeration Documentation enum QwtDoubleInterval::BorderMode Flag indicating if a border is included/excluded from an interval o IncludeBorders min/max values are inside the interval o ExcludeMinimum min value is not included in the interval o ExcludeMaximum max value is not included in the interval o ExcludeBorders min/max values are not included in the interval See also: setBorderMode(), testBorderMode() Constructor &; Destructor Documentation QwtDoubleInterval::QwtDoubleInterval () [inline] Default Constructor. Creates an invalid interval [0.0, -1.0] See also: setInterval(), isValid() QwtDoubleInterval::QwtDoubleInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Constructor Build an interval with from min/max values Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders Member Function Documentation int QwtDoubleInterval::borderFlags () const [inline] Returns: Border flags See also: setBorderFlags() bool QwtDoubleInterval::contains (doublevalue) const Test if a value is inside an interval Parameters: value Value Returns: true, if value >= minValue() && value <= maxValue() QwtDoubleInterval QwtDoubleInterval::extend (doublevalue) const Extend the interval If value is below minValue, value becomes the lower limit. If value is above maxValue, value becomes the upper limit. extend has no effect for invalid intervals Parameters: value Value See also: isValid() QwtDoubleInterval QwtDoubleInterval::intersect (const QwtDoubleInterval &other) const Intersect 2 intervals. bool QwtDoubleInterval::intersects (const QwtDoubleInterval &other) const Test if two intervals overlap void QwtDoubleInterval::invalidate () [inline] Invalidate the interval The limits are set to interval [0.0, -1.0] See also: isValid() QwtDoubleInterval QwtDoubleInterval::inverted () const Invert the limits of the interval Returns: Inverted interval See also: normalized() bool QwtDoubleInterval::isNull () const [inline] Returns: true, if isValid() && (minValue() >= maxValue()) bool QwtDoubleInterval::isValid () const [inline] A interval is valid when minValue() <= maxValue(). In case of QwtDoubleInterval::ExcludeBorders it is true when minValue() < maxValue() QwtDoubleInterval QwtDoubleInterval::limited (doublelowerBound, doubleupperBound) const Limit the interval, keeping the border modes Parameters: lowerBound Lower limit upperBound Upper limit Returns: Limited interval double QwtDoubleInterval::maxValue () const [inline] Returns: Upper limit of the interval double QwtDoubleInterval::minValue () const [inline] Returns: Lower limit of the interval QwtDoubleInterval QwtDoubleInterval::normalized () const Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted. Returns: Normalized interval See also: isValid(), inverted() int QwtDoubleInterval::operator!= (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator& (const QwtDoubleInterval &interval) const [inline] Intersection of two intervals See also: intersect() QwtDoubleInterval & QwtDoubleInterval::operator&= (const QwtDoubleInterval &interval) Intersects this interval with the given interval. int QwtDoubleInterval::operator== (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator| (const QwtDoubleInterval &interval) const [inline] Union of two intervals See also: unite() QwtDoubleInterval QwtDoubleInterval::operator| (doublevalue) const [inline] Extend an interval See also: extend() QwtDoubleInterval & QwtDoubleInterval::operator|= (const QwtDoubleInterval &interval) Unites this interval with the given interval. void QwtDoubleInterval::setBorderFlags (intborderFlags) [inline] Change the border flags Parameters: borderFlags Or'd BorderMode flags See also: borderFlags() void QwtDoubleInterval::setInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Assign the limits of the interval Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders void QwtDoubleInterval::setMaxValue (doublemaxValue) [inline] Assign the upper limit of the interval Parameters: maxValue Maximum value void QwtDoubleInterval::setMinValue (doubleminValue) [inline] Assign the lower limit of the interval Parameters: minValue Minimum value QwtDoubleInterval QwtDoubleInterval::symmetrize (doublevalue) const Adjust the limit that is closer to value, so that value becomes the center of the interval. Parameters: value Center Returns: Interval with value as center QwtDoubleInterval QwtDoubleInterval::unite (const QwtDoubleInterval &other) const Unite 2 intervals. double QwtDoubleInterval::width () const [inline] Return the width of an interval The width of invalid intervals is 0.0, otherwise the result is maxValue() - minValue(). See also: isValid() Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtDoubleInterval(3)
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy