06-26-2008
how to retreive a block of data from the file
Hi
I have a several thousands lines text file. Is there any command(s), which would allow me to retreive a block of data between two specified lines of this file?
Thanks a lot -A
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings All!!
I have a very peculiar problem where I have to parse a big text file and extract useful data out of it with starting and ending block pattern matching.
e.g. I have a input file like this:
sample data
block1
sample data
start
useful data
end
sample data
block2
sample... (5 Replies)
Discussion started by: arminder
5 Replies
2. Shell Programming and Scripting
Hi,
I want to extract block of data from flat file.
the data will be like this
start of log
One
two
three
end of log
i want all data between start of log to end of log i.e One
two
three to be copied to another file.
This particular block may appear multiple times in same file. I... (4 Replies)
Discussion started by: shirish_cd
4 Replies
3. Shell Programming and Scripting
Hi
I have a text file which has two sets of lines repeating for "n" number of times.Some data is printed between the two lines.I want to retrieve all the data thats there in between those two set of lines.I have the string value of those two set of lines.
To be much more clearer
... (4 Replies)
Discussion started by: chennaitomcruis
4 Replies
4. Shell Programming and Scripting
Hi
I am running a 'grep' command to retrieve a line from the file. The problem is that I also need 21 lines which go right after the line I just 'grep'(ed)
Is there a way to retrieve this block of data? Thanks -A (4 Replies)
Discussion started by: aoussenko
4 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Currently i have to write a script.
For which i need to cut a block from .txt file.
I know the specific word that starts the block and ends the block.
Can we do it in shell scripting..?
Please suggest.... (6 Replies)
Discussion started by: pank29
6 Replies
6. Linux
Hi All,
I am writing a block driver for a 2GB SD card where i get the total amount of data per request as follows:
struct request *req;
uint card_addr,total_bytes;
struct request_queue *rq = BlkDev->queue;
req = elv_next_request(rq);
..
..
card_addr = req->sector*512;... (1 Reply)
Discussion started by: amio
1 Replies
7. Shell Programming and Scripting
Ladles and Jellyspoons,I am trying to use, unsucessfully I might add, awk to strip a large block of information from and audit output.The format resembles the following:-----------------------------------------------------------Event: execveTime: ... (3 Replies)
Discussion started by: proc1269
3 Replies
8. Solaris
Some one please help me to find deleted file name, if I am having inode number in Solaris without using any 3rd party tool.
Thanks :) (3 Replies)
Discussion started by: aksijain
3 Replies
9. Shell Programming and Scripting
Hi all
I have following part of a big file
TTDS00002 Synonyms M1 receptor
TTDS00002 Disease Alzheimer's disease
TTDS00002 Disease Bronchospasm (histamine induced)
TTDS00002 Disease Cognitive deficits
TTDS00002 Disease Schizophrenia
TTDS00002 Function The muscarinic acetylcholine... (2 Replies)
Discussion started by: kareena
2 Replies
10. Shell Programming and Scripting
I need to send email to receipient in each block of data in a file which has the sender address under TO and just send that block of data where it ends as COMPANY.
I tried to work this out by getting line numbers of the string HELLO but unable to grab the next block of data to send the next... (5 Replies)
Discussion started by: loggedout
5 Replies
LEARN ABOUT DEBIAN
text::mediawikiformat::blocks
Text::MediawikiFormat::Blocks(3pm) User Contributed Perl Documentation Text::MediawikiFormat::Blocks(3pm)
NAME
Text::MediawikiFormat::Blocks - blocktypes for Text::MediawikiFormat
SYNOPSIS
None. Use Text::MediawikiFormat as the public interface, unless you want to create your own block type.
DESCRIPTION
This module merely creates subclasses of Text::MediawikiFormat::Block, which is the interesting code. A block is a collection of related
lines, such as a code block (text to display verbatim in a monospaced font), a header, an unordered list, an ordered list, and a paragraph
(text to display in a proportional font).
Every block extends "Text::MediawikiFormat::Block".
METHODS
The following methods exist:
o "new( %args )"
Creates and returns a new block. The valid arguments are:
o "text"
The text of the line found in the block.
o "args"
The arguments captured by the block-identifying regular expression.
o "level"
The level of indentation for the block (usually only useful for list blocks).
o "tags"
The tags in effect for the current type of wiki formatting.
o "opts"
The options in effect for the current type of wiki formatting.
Use the accessors of the same names to retrieve the values of the attributes.
o "add_text( @lines_of_text )"
Adds a list of lines of text to the current text for the block. This is very useful when you encounter a block and want to merge it
with the previous block of the same type
o "add_args( @arguments )"
Adds further arguments to the block; useful when merging blocks.
o "formatted_text()"
Returns text formatted appropriately for this block. Blocks don't have to have formatters, but they may.
o "formatter( $line_of_text )"
Formats the $line using "Text::MediawikiFormat::format_line()". You can add your own formatter here; this is worth overriding.
o "merge( $next_block )"
Merges the current block with $next_block (the next block encountered) if they're of the same type and are at the same level. This
adds the text and args of $next_block to the current block. It's your responsibility to remove $next_block from whatever your code
iterates over.
o "nests()"
Returns true if this block should nest (as in lists and unordered lists) for the active wiki formatting.
o "nest( $next_block )"
Nests $next_block under this block if the both nest and if $next_block has a level greater than the current block. This actually adds
$next_block as a text item within the current block. Beware.
AUTHOR
chromatic, "chromatic at wgz dot org"
BUGS
No known bugs.
COPYRIGHT
Copyright (c) 2006, chromatic. Some rights reserved.
This module is free software; you can use, redistribute, and modify it under the same terms as Perl 5.8.x.
perl v5.10.1 2008-06-19 Text::MediawikiFormat::Blocks(3pm)