Sponsored Content
Full Discussion: Gap length between intervals
Top Forums UNIX for Dummies Questions & Answers Gap length between intervals Post 302956444 by vbe on Wednesday 30th of September 2015 04:16:06 AM
Old 09-30-2015
A hint:
Code:
while read VAR1 VAR2
do
   echo $VAR2 " " $VAR1
done<your_file

With the above you should be able to figure out the next step...

Cheers
This User Gave Thanks to vbe For This Post:
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

2. UNIX for Dummies Questions & Answers

Sed working on lines of small length and not large length

Hi , I have a peculiar case, where my sed command is working on a file which contains lines of small length. sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine. when abc.txt contains lines of... (3 Replies)
Discussion started by: thanuman
3 Replies

3. Shell Programming and Scripting

Decrease the Line Gap in a files and Echo a strings

Hi Expert, I have a file contains-- GET:RSUB:ISI,432350114637601; RESP:0:MDN,9352608473:ISI,432350114637601:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,0:BOIC,0:BIRO,0:BORO,0:BOIH,0:BOS4,0:CLIP,1:CLIR,0:CFB,1; GET:RSUB:ISI,432350114281653; ... (5 Replies)
Discussion started by: thepurple
5 Replies

4. Shell Programming and Scripting

How to use while loop in bash shell to read a file with 4 lines of gap

Hi , I am currently using the while loop in bash shell, as follows. while read line do echo $line done < file.txt However, i want to use the while loop on file.txt, which will read the file with 4 lines of gap. Ex- if file.txt is a file of 100 lines, then i want to use the loop such... (3 Replies)
Discussion started by: jitendriya.dash
3 Replies

5. Shell Programming and Scripting

Need to find the gap in the sequence of numbers

Hi Guys, I have a file with numbers in sequence. The sequence have been broken somewhere.. I need to find out at which number the sequence has been broken... For an example, consider this sequence, it needs to give me output as 4 (as 5 is missing) and 6(as 7 is missing) Thanks for... (3 Replies)
Discussion started by: mac4rfree
3 Replies

6. Shell Programming and Scripting

Flat file-make field length equal to header length

Hello Everyone, I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table. Input Data- ------ ------------------------ ---- ----------------- WFI001 Xxxxxx Control Work Item A Number of Records ------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies

7. Shell Programming and Scripting

Finding contiguous numbers in a list but with a gap number tolerance

Dear all, I have a imput file like this imput scaffold_0 10558458 10558459 1.8 scaffold_0 10558464 10558465 1.75 scaffold_0 10558467 10558468 1.8 scaffold_0 10558468 10558469 1.71428571428571 scaffold_0 10558469... (5 Replies)
Discussion started by: valente
5 Replies
QwtInterval(3)							 Qwt User's Guide						    QwtInterval(3)

NAME
QwtInterval - A class representing an interval. SYNOPSIS
#include <qwt_interval.h> Public Types enum BorderFlag { IncludeBorders = 0x00, ExcludeMinimum = 0x01, ExcludeMaximum = 0x02, ExcludeBorders = ExcludeMinimum | ExcludeMaximum } typedef QFlags< BorderFlag > BorderFlags Public Member Functions QwtInterval () QwtInterval (double minValue, double maxValue, BorderFlags=IncludeBorders) void setInterval (double minValue, double maxValue, BorderFlags=IncludeBorders) QwtInterval normalized () const QwtInterval inverted () const QwtInterval limited (double minValue, double maxValue) const bool operator== (const QwtInterval &) const bool operator!= (const QwtInterval &) const void setBorderFlags (BorderFlags) BorderFlags borderFlags () const double minValue () const double maxValue () const double width () const void setMinValue (double) void setMaxValue (double) bool contains (double value) const bool intersects (const QwtInterval &) const QwtInterval intersect (const QwtInterval &) const QwtInterval unite (const QwtInterval &) const QwtInterval operator| (const QwtInterval &) const QwtInterval operator& (const QwtInterval &) const QwtInterval & operator|= (const QwtInterval &) QwtInterval & operator&= (const QwtInterval &) QwtInterval extend (double value) const QwtInterval operator| (double) const QwtInterval & operator|= (double) bool isValid () const bool isNull () const void invalidate () QwtInterval symmetrize (double value) const Detailed Description A class representing an interval. The interval is represented by 2 doubles, the lower and the upper limit. Member Typedef Documentation typedef QFlags<BorderFlag> QwtInterval::BorderFlags Border flags. Member Enumeration Documentation enum QwtInterval::BorderFlag Flag indicating if a border is included or excluded See also: setBorderFlags(), borderFlags() Enumerator: IncludeBorders Min/Max values are inside the interval. ExcludeMinimum Min value is not included in the interval. ExcludeMaximum Max value is not included in the interval. ExcludeBorders Min/Max values are not included in the interval. Constructor &; Destructor Documentation QwtInterval::QwtInterval () [inline] Default Constructor. Creates an invalid interval [0.0, -1.0] See also: setInterval(), isValid() QwtInterval::QwtInterval (doubleminValue, doublemaxValue, BorderFlagsborderFlags = 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 QwtInterval::BorderFlags QwtInterval::borderFlags () const [inline] Returns: Border flags See also: setBorderFlags() bool QwtInterval::contains (doublevalue) const Test if a value is inside an interval Parameters: value Value Returns: true, if value >= minValue() && value <= maxValue() QwtInterval QwtInterval::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() QwtInterval QwtInterval::intersect (const QwtInterval &other) const Intersect 2 intervals. bool QwtInterval::intersects (const QwtInterval &other) const Test if two intervals overlap void QwtInterval::invalidate () [inline] Invalidate the interval The limits are set to interval [0.0, -1.0] See also: isValid() QwtInterval QwtInterval::inverted () const Invert the limits of the interval Returns: Inverted interval See also: normalized() bool QwtInterval::isNull () const [inline] Returns: true, if isValid() && (minValue() >= maxValue()) bool QwtInterval::isValid () const [inline] A interval is valid when minValue() <= maxValue(). In case of QwtInterval::ExcludeBorders it is true when minValue() < maxValue() QwtInterval QwtInterval::limited (doublelowerBound, doubleupperBound) const Limit the interval, keeping the border modes Parameters: lowerBound Lower limit upperBound Upper limit Returns: Limited interval double QwtInterval::maxValue () const [inline] Returns: Upper limit of the interval double QwtInterval::minValue () const [inline] Returns: Lower limit of the interval QwtInterval QwtInterval::normalized () const Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted. Returns: Normalized interval See also: isValid(), inverted() bool QwtInterval::operator!= (const QwtInterval &other) const [inline] Compare two intervals. QwtInterval QwtInterval::operator& (const QwtInterval &interval) const [inline] Intersection of two intervals See also: intersect() QwtInterval & QwtInterval::operator&= (const QwtInterval &interval) Intersects this interval with the given interval. bool QwtInterval::operator== (const QwtInterval &other) const [inline] Compare two intervals. QwtInterval QwtInterval::operator| (const QwtInterval &interval) const [inline] Union of two intervals See also: unite() QwtInterval QwtInterval::operator| (doublevalue) const [inline] Extend an interval Parameters: value Value Returns: Extended interval See also: extend() QwtInterval & QwtInterval::operator|= (const QwtInterval &interval) Unites this interval with the given interval. QwtInterval & QwtInterval::operator|= (doublevalue) Extend an interval Parameters: value Value Returns: Reference of the extended interval See also: extend() void QwtInterval::setBorderFlags (BorderFlagsborderFlags) [inline] Change the border flags Parameters: borderFlags Or'd BorderMode flags See also: borderFlags() void QwtInterval::setInterval (doubleminValue, doublemaxValue, BorderFlagsborderFlags = IncludeBorders) [inline] Assign the limits of the interval Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders void QwtInterval::setMaxValue (doublemaxValue) [inline] Assign the upper limit of the interval Parameters: maxValue Maximum value void QwtInterval::setMinValue (doubleminValue) [inline] Assign the lower limit of the interval Parameters: minValue Minimum value QwtInterval QwtInterval::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 QwtInterval QwtInterval::unite (const QwtInterval &other) const Unite 2 intervals. double QwtInterval::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 6.0.0 Fri Apr 15 2011 QwtInterval(3)
All times are GMT -4. The time now is 06:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy