I need a better way to read the first character of each line in a file and check if it equals the special character ¤. This character tells me where there is a break in the reports. The file has over 500,000 lines. Currently, this is my code -
if ]
I am using Korn Shell as a scripting... (7 Replies)
Hi Experts,
I have called file1.txt contains below
CREATE TABLE "IHUBDEV2"."TLM_BREAK_RULES"
( "OID" VARCHAR2(32) NOT NULL ENABLE,
"TLM_PAY_CLASS_OID" VARCHAR2(32) NOT NULL ENABLE,
"PUNCHED_BREAKS" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE,
"NORMAL_BREAKS"... (3 Replies)
Hi people;
i want to read the last word of the 14th line of my file1.txt. Here is the EXACT 14th line of the file.
250 SectorPortnum=3,AuxPortInUngo=2,PortDeviceGroup=1,PortDeviceSet=1,PorDevice=1 20 >>> Set.
i have to get the word Set. how can i call it and also how... (3 Replies)
Hi,
Maybe this iscorrect forum for my question...
I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below:
while read line ; do
single_char=`???`
echo "$single_char"
done < $input_file
OK...I did get an... (0 Replies)
Hi,
I want to read the file from nth line (where n is an integer) to until I encounter @ char.
Can any one please help me how to do this?
Thanks. (3 Replies)
Is there an awk script that can easily perform the following operation?
I have a data file that is in the format of
1944-12,5.6
1945-01,9.8
1945-02,6.7
1945-03,9.3
1945-04,5.9
1945-05,0.7
1945-06,0.0
1945-07,0.0
1945-08,0.0
1945-09,0.0
1945-10,0.2
1945-11,10.5
1945-12,22.3... (3 Replies)
I have a script which reads from a job file and executed the scripts in the job file in sequence.
#! /bin/ksh
set -x
while read line
do
$line.ksh
if
# mail the team
fi
done <"$file"
The job file will be like
abcd
efgh
ijkl
mnop
qrst
This is working fine. I need to add... (2 Replies)
Hi All,
My file is a string of around 50K character.
I'm trying to insert new line after every 320 character in my file.
I know the command to insert newline, but problem is I'm not able to search 320th position.
Please advice. (6 Replies)
Hi friend,
I have one file , and i want to read that file character by character.
I need this script in ksh.
while using read option with -n1 am getting error.
while read -n1 c read has bad option
And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Hi
I got the following problem and I wonder if some could please help me out?
I'd like to replace character 8 - 16 , 16 - 24
cat file
... (2 Replies)
Discussion started by: stinkefisch
2 Replies
LEARN ABOUT DEBIAN
plucene::index::segmentreader
Plucene::Index::SegmentReader(3pm) User Contributed Perl Documentation Plucene::Index::SegmentReader(3pm)NAME
Plucene::Index::SegmentReader - the Segment reader
SYNOPSIS
my $seg_reader =
Plucene::Index::SegmentReader->new( Plucene::Index::SegmentInfo $si);
my @files = $seg_reader->files;
my @terms = $seg_reader->terms;
my $doc = $seg_reader->document($id);
my $doc_freq = $seg_reader->doc_freq($term);
my $max_doc = $seg_reader->max_doc;
my $norms = $seg_reader->norms($field, $offset);
my Plucene::Index::SegmentTermDocs $docs
= $seg_reader->term_docs($term);
my Plucene::Index::SegmentTermPositions $pos
= $seg_reader->term_positions($term);
my Plucene::Store::InputStream $stream
= $seg_reader->norm_stream($field);
if ($seg_reader->is_deleted($id)) { .. }
if ($seg_reader->has_deletions(Plucene::Index::SegmentInfo $si))
{ ... }
DESCRIPTION
The segment reader class.
METHODS
new
my $seg_reader =
Plucene::Index::SegmentReader->new( Plucene::Index::SegmentInfo $si);
This will create a new Plucene::Index::SegmentReader object.
has_deletions
if ($seg_reader->has_deletions(Plucene::Index::SegmentInfo $si))
{ ... }
files
my @files = $seg_reader->files;
terms
my @terms = $seg_reader->terms;
document
my $doc = $seg_reader->document($id);
is_deleted
if ($seg_reader->is_deleted($id)) { .. }
term_docs
my Plucene::Index::SegmentTermDocs $docs
= $seg_reader->term_docs($term);
This will return the Plucene::Index::SegmentTermDocs object for the given term.
term_positions
my Plucene::Index::SegmentTermPositions $pos
= $seg_reader->term_positions($term);
This will return the Plucene::Index::SegmentTermPositions object for the given term.
doc_freq
my $doc_freq = $seg_reader->doc_freq($term);
This returns the number of documents containing the passed term.
num_docs
my $num_docs = $seg_reader->num_docs;
This is the number of documents, excluding deleted ones.
max_doc
my $max_doc = $seg_reader->max_doc;
norms
my $norms = $seg_reader->norms($field, $offset);
This returns the byte-encoded normalisation factor for the passed field. This is used by the search code to score documents.
Note we are not using the 'offset' and 'bytes' arguments per the Java. Instead, callers should use substr to put the result of "norms"
into the appropriate place in a string.
norm_stream
my Plucene::Store::InputStream $stream
= $seg_reader->norm_stream($field);
This will return the Plucene::Store::InputStream for the passed field.
perl v5.12.4 2011-08-14 Plucene::Index::SegmentReader(3pm)