It is not clear what you mean with diff value, is that field 6 or field 10. Also is the difference only >10 or also <-10 :
Here is an example you could try with $6 and both negative and positive, to give you an idea of how this might be approached:
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
Hi Experts,
Help needed on joining one line above & below to the pattern matched string line.
The input file, required output is mentioned below
Input file
ABCD DEFG5 42.0.1-63.38.31
KKKK iokl IP Connection Available
ABCD DEFG5 42.0.1-63.38.31
... (7 Replies)
Hello,
I'm new to this forum. I've been doing a lot of sed work lately and have found many useful tips on this forum. I've hit a roadblock in a project, though, and could really use some help.
I have a text file with many lines like the following, i.e., some lines begin with a single word... (3 Replies)
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Hello Friends,
I need to print lines in between two string when a keyword existed in those lines (keywords like exception, error, failed, not started etc).
for example,
input:
..
Begin Edr
ab12
ac13
ad14
bc23
exception occured
bd24
cd34
dd44
ee55
ff66
End Edr (2 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
hello everyone,
im new here, and also programming with awk, sed and grep commands on linux.
In my text i have many lines with this config:
1 1 4 3 1 1 2 5
2 2 1 1 1 3 1 2
1 3 1 1 1 2 2 2
5 2 4 1
3 2 1 1 4 1 2 1
1 1 3 2 1 1 5 4
1 3 1 1... (3 Replies)
Hi I want to print the line until pattern is matched.
I am using below code:
sed -n '1,/pattern / p' file
It is working fine for me , but its not working for exact match.
sed -n '1,/^LAC$/ p' file
Input:
LACC FEGHRA 0
LACC FACAF 0
LACC DARA 0
LACC TALAC 0
LAC ILACTC 0... (8 Replies)
Discussion started by: Abhisrajput
8 Replies
LEARN ABOUT DEBIAN
gd_bof
gd_bof(3) GETDATA gd_bof(3)NAME
gd_bof -- report the start of data in a field
SYNOPSIS
#include <getdata.h>
off_t gd_bof(DIRFILE *dirfile, const char *field_code);
DESCRIPTION
The gd_bof() function queries a dirfile(5) database specified by dirfile and returns the sample number of the beginning-of-field marker for
the vector field given by field_code.
The caller should not assume that the beginning-of-field marker falls on a frame boundary. The beginning-of-field marker is never nega-
tive.
For a RAW field, the beginning-of-field corresponds to the frame offset of that field (see gd_frameoffset(3)). The beginning-of-field for
all other vector field type is the same as the beginning-of-field of whichever of its input fields that starts latest. The beginning-of-
field marker for the special field INDEX is always zero.
The beginning-of-field marker for a field containing no data is in the same location as, or after, its end-of-field marker (see gd_eof(3)).
For a RAW field, the difference between the locations of the beginning- and end-of-field markers indicates the number of samples of data
actually stored on disk.
The dirfile argument must point to a valid DIRFILE object previously created by a call to gd_open(3).
RETURN VALUE
Upon successful completion, gd_bof() returns the sample number of the end-of-field marker for the indicated field. On error, it returns -1
and sets the dirfile error to a non-zero error value. Possible error values are:
GD_E_BAD_CODE
The field specified by field_code or one of the fields it uses as input was not found in the database.
GD_E_BAD_DIRFILE
The supplied dirfile was invalid.
GD_E_BAD_REPR
The representation suffix specified in field_code, or in one of its inputs was not recognised.
GD_E_DIMENSION
A scalar field was found where a vector field was expected in the definition of field_code or one of its inputs, or else field_code
itself specified a scalar field.
GD_E_RECURSE_LEVEL
Too many levels of recursion were encountered while trying to resolve field_code. This usually indicates a circular dependency in
field specification in the dirfile.
The dirfile error may be retrieved by calling gd_error(3). A descriptive error string for the last error encountered can be obtained from
a call to gd_error_string(3).
SEE ALSO dirfile(5), dirfile-encoding(5), gd_open(3), gd_eof(3), gd_error(3), gd_error_string(3), gd_nframes(3)Version 0.7.0 15 October 2010 gd_bof(3)