Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

io::innerfile(3) [osx man page]

IO::InnerFile(3)					User Contributed Perl Documentation					  IO::InnerFile(3)

NAME
IO::InnerFile - define a file inside another file SYNOPSIS
### Read a subset of a file: $inner = IO::InnerFile->new($fh, $start, $length); while (<$inner>) { ... } DESCRIPTION
If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file. PUBLIC INTERFACE
new FILEHANDLE, [START, [LENGTH]] Class method, constructor. Create a new inner-file opened on the given FILEHANDLE, from bytes START to START+LENGTH. Both START and LENGTH default to 0; negative values are silently coerced to zero. Note that FILEHANDLE must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it. set_length LENGTH get_length add_length NBYTES Instance methods. Get/set the virtual length of the inner file. set_start START get_start add_start NBYTES Instance methods. Get/set the virtual start position of the inner file. binmode close flush getc getline print LIST printf LIST read BUF, NBYTES readline seek OFFFSET, WHENCE tell write ARGS... Instance methods. Standard filehandle methods. VERSION
$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $ AUTHOR
Original version by Doru Petrescu (pdoru@kappa.ro). Documentation and by Eryq (eryq@zeegee.com). Currently maintained by David F. Skoll (dfs@roaringpenguin.com). perl v5.16.2 2005-02-10 IO::InnerFile(3)

Check Out this Related Man Page

IO::InnerFile(3)					User Contributed Perl Documentation					  IO::InnerFile(3)

NAME
IO::InnerFile - define a file inside another file SYNOPSIS
### Read a subset of a file: $inner = IO::InnerFile->new($fh, $start, $length); while (<$inner>) { ... } DESCRIPTION
If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file. PUBLIC INTERFACE
new FILEHANDLE, [START, [LENGTH]] Class method, constructor. Create a new inner-file opened on the given FILEHANDLE, from bytes START to START+LENGTH. Both START and LENGTH default to 0; negative values are silently coerced to zero. Note that FILEHANDLE must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it. set_length LENGTH get_length add_length NBYTES Instance methods. Get/set the virtual length of the inner file. set_start START get_start add_start NBYTES Instance methods. Get/set the virtual start position of the inner file. binmode close flush getc getline print LIST printf LIST read BUF, NBYTES readline seek OFFFSET, WHENCE tell write ARGS... Instance methods. Standard filehandle methods. VERSION
$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $ AUTHOR
Original version by Doru Petrescu (pdoru@kappa.ro). Documentation and by Eryq (eryq@zeegee.com). Currently maintained by David F. Skoll (dfs@roaringpenguin.com). perl v5.16.3 2005-02-10 IO::InnerFile(3)
Man Page

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adjusting the output in a file

QUERY SCENARIO Here is the actual scenario LOOP echo "$COLNAME $TYPENAME($LENGTH) $NULLS ">>$DDL_FILE END-LOOP COLNAME, TYPENAME, LENGTH, NULLS are the variables and within echo statment the output of which has to go into file specified by DDL_FILE. ... (1 Reply)
Discussion started by: skyineyes
1 Replies

2. Shell Programming and Scripting

SED: Print range, exclude regular expressions.

Ok, so I get that: sed -n '/START/,/END/p' file ...will print every line from START to END inclusive, but I don't want to see START or END. Apart from the obious: sed -n '/START/,/END/p' file | grep -v "START" | grep -v "END" ...is there a simpler way of doing this? Thanks as always! (2 Replies)
Discussion started by: cs03dmj
2 Replies

3. Shell Programming and Scripting

Help needed on SED

Hi, I would like to process one file which looks like this : 09-04-16-17:11:53 -> count 1 NAME CHAN QID NMSGS NBYTES MAXBYTES P/T W_DEALNUM 105 123508770 1 10 14 P W_APPSTAT 106 123508771 1 12 35 P... (8 Replies)
Discussion started by: vive123
8 Replies

4. Shell Programming and Scripting

Perl regex using /START/../END/

I need help with perl code. I have a data file with lots of data example: data.txt file START DATA1 sjdfh kjhdf DATA2 sdkjfhk jds dshfgdf ... Around 20 - 30 lines END LDDDD awdkjasd a sdkahgdk jasdh SOME CRAP Some EMPTY lines etc START DATA1 sjdfh kjhdf DATA2 sdkjfhk jds... (2 Replies)
Discussion started by: chakrapani
2 Replies

5. UNIX for Dummies Questions & Answers

grep in multiple lines

hi i have kind of below text in a file. I want to get a complete paragraph starting with START and ending with before another START) which has a particular string say XYZ or ABC START XYZ hshjghkjh 45 ljkfd fldjlj d jldf START 3493u ABC 454 4545454 4545454 45454 4545454 START ...... (3 Replies)
Discussion started by: reldb
3 Replies

6. Shell Programming and Scripting

Help with sed/awk for reverse search and print

I have a file which is DFDG START DSFDS DSDS XXX END (VIO) AADD START SDSD FGFG END and I have to print the lines between START and END (VIO). In the files there are multiple places where START would be followed by END with few lines in between but I need to print only if START is... (18 Replies)
Discussion started by: pgbuddy
18 Replies

7. UNIX for Dummies Questions & Answers

Join lines on finding a pattern

I have a file with the following contents. DTP START START START DTP START DTP START DTP START I like to join the lines like this DTP START START START DTP START DTP START (2 Replies)
Discussion started by: nsuresh316
2 Replies

8. Shell Programming and Scripting

sed print from last occurrence match until the end of last occurrence match

Hi, i have file file.txt with data like: START 03:11:30 a 03:11:40 b END START 03:13:30 eee 03:13:35 fff END jjjjjjjjjjjjjjjjjjjjj START 03:14:30 eee 03:15:30 fff END ggggggggggg iiiiiiiiiiiiiiiiiiiiiiiii I want the below output START (13 Replies)
Discussion started by: Jyotshna
13 Replies