Hi All,
is there a way to extract the line number of an occurrence using grep?
I know that with the -n option it prints out the line number as well.
I would like to assign the line number to a variable.
Thanks,
Sarah (5 Replies)
Hi all,
is there a simple way to obtain the line number of the i-th occurrence of a pattern?
I have
OCCURRENCE=`grep -io "${STRING_NAME}" ${1}-${8}${EXT}.out_bis| wc -l`
which tells me how many occurency I have. I would like to go through them and determine the line number and assign... (6 Replies)
Alo
I have a file with a lot of addresses where I want to list unique addresses and the number of theirs occurrence.
I have this input file:
0011bd09 ea 01 0b 04 ea 01 0b 38-bd 11 00 98 15 cb 01 00 .......8........
0011bd09 ea 11 00 98 15 cb 01 00-00 00 00 d8 3d 8d 01 94 ... (5 Replies)
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Hi
I have the following file
ENST001 ENST002 4 4 4 88 9 9
ENST004 3 3 3 99 8 8
ENST009 ENST010 ENST006 8 8 8 77 8 8
Basically I want to count how many times ENST* is repeated in each line so the expected results is
2
1
3
Any suggestion please ? (4 Replies)
Hi,
I have a file which contained a set of numbers like
Col1 col2 col3 col4
1 sa 13 0
2 sb 14 0
3 sc 15 9
4 sd 16 -9
5 sd 20 -2
6 sd 20 4
Here in last column I need to count the zeros, positive values and negative values,
please help me to do that. (2 Replies)
My file contains like this on 10 th line
NM1*IL*1*
awk '/NM1/{print NR}' *.dat
output is 10
awk '/NM1*IL*1*/{print NR}' *.dat
output is Nothing
but im expecting 10 on second code as well . (4 Replies)
Hi all,
I am looking for to filter out based on 7th character and list the number of occurrence based on the 7th character if p , d , o or m
1. if 7th character is p , Output should be: p_hosts = N
2. if 7th character is d , Output should be: d_hosts = N
3. if 7th character is o , Output... (10 Replies)
Hello,
I'm looking for advice on how to optimize this bash script, currently i use the shotgun approach to avoid file io/buffering problems of forks trying to write simultaneously to the same file. i'd like to keep this as a fairly portable bash script rather than writing a C routine.
in a... (8 Replies)
Discussion started by: f77hack
8 Replies
LEARN ABOUT CENTOS
tiffwriterawstrip
TIFFWriteRawstrip(3TIFF)TIFFWriteRawstrip(3TIFF)NAME
TIFFWriteRawStrip - write a strip of raw data to an open TIFF file
SYNOPSIS
#include <tiffio.h>
tsize_t TIFFWriteRawStrip(TIFF *tif, tstrip_t strip, tdata_t buf, tsize_t size)
DESCRIPTION
Append size bytes of raw data to the specified strip.
NOTES
The strip number must be valid according to the current settings of the ImageLength and RowsPerStrip tags. An image may be dynamically
grown by increasing the value of ImageLength prior to each call to TIFFWriteRawStrip.
RETURN VALUES -1 is returned if an error occurred. Otherwise, the value of size is returned.
DIAGNOSTICS
All error messages are directed to the TIFFError(3TIFF) routine.
%s: File not open for writing. The file was opened for reading, not writing.
Can not write scanlines to a tiled image. The image is assumed to be organized in tiles because the TileWidth and TileLength tags have been
set with TIFFSetField(3TIFF).
%s: Must set "ImageWidth" before writing data. The image's width has not be set before the first write. See TIFFSetField(3TIFF) for
information on how to do this.
%s: Must set "PlanarConfiguration" before writing data. The organization of data has not be defined before the first write. See TIFFSet-
Field(3TIFF) for information on how to do this.
%s: No space for strip arrays". There was not enough space for the arrays that hold strip offsets and byte counts.
%s: Strip %d out of range, max %d. The specified strip is not a valid strip according to the currently specified image dimensions.
SEE ALSO TIFFOpen(3TIFF), TIFFWriteEncodedStrip(3TIFF), TIFFWriteScanline(3TIFF), libtiff(3TIFF)
Libtiff library home page: http://www.remotesensing.org/libtiff/
libtiff October 15, 1995 TIFFWriteRawstrip(3TIFF)