Sponsored Content
Full Discussion: Extract a line from a file.
Top Forums Shell Programming and Scripting Extract a line from a file. Post 302388940 by anupdas on Friday 22nd of January 2010 01:42:07 AM
Old 01-22-2010
Thanks everyone....
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Extract line from file

Hello, guys! I want to extract one specific line from a file. Can someone help me with this? (2 Replies)
Discussion started by: kingkong
2 Replies

2. UNIX for Advanced & Expert Users

Extract line from file

Dear Members! How can I extract on line from a file? (1 Reply)
Discussion started by: kingkong
1 Replies

3. Shell Programming and Scripting

Extract a line from a file using the line number

I have a shell script and want to assign a value to a variable. The value is the line exctrated from a file using the line number. The line number it is not fix, and could change any time. I have tried sed, awk, head .. See my script # Get randome line number from the file #selectedline = `awk... (1 Reply)
Discussion started by: zambo
1 Replies

4. Shell Programming and Scripting

extract a line from a file using the line number

Hello, I am having trouble extracting a specific line from a file when the line number is known. My first attempt involved grep -n 'hi' (the word 'hi will always be there) to get the line number before the line that I actually want (line 4). Extra Notes: -I am working in a bash script. -The... (7 Replies)
Discussion started by: grandtheftander
7 Replies

5. Shell Programming and Scripting

File Line Extract

If i have a file, how do i create a new file with say line x to y from the file i have. Eg. File1 has 100 line, i want File2 to have line 50-60 from File1 (4 Replies)
Discussion started by: kelseyh
4 Replies

6. Shell Programming and Scripting

extract line by line from file

hi dudes, I have a text file in the below format 1 s sanity /u02 2 r script1 /u02 3 s sanity /u02 Please tell me a script to read this file line by line, I wrote the below script , but it is printing only 1st line not printing rest... (7 Replies)
Discussion started by: shirdi
7 Replies

7. Shell Programming and Scripting

get the fifth line of a text file into a shell script and trim the line to extract a WORD

FOLKS , i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one. thanks... Venu (3 Replies)
Discussion started by: venu
3 Replies

8. Shell Programming and Scripting

extract a line from a file by line number

Hi guys, does anyone know how to extract(grep) a line from the file, if I know the line number? Thanks a lot. (9 Replies)
Discussion started by: aoussenko
9 Replies

9. Shell Programming and Scripting

HELP: Shell Script to read a Log file line by line and extract Info based on KEYWORDS matching

I have a LOG file which looks like this Import started at: Mon Jul 23 02:13:01 EDT 2012 Initialization completed in 2.146 seconds. -------------------------------------------------------------------------------- -- Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies

10. Shell Programming and Scripting

Perl to extract information from a file line by line

In the below perl code I am using tags within each line to extract certain information. The tags that are used are: STB >0.8 is STRAND BIAS otherwise GOOD FDP is the second number GO towards the end of the line is read into an array and the value returned is outputed, in the first line that... (1 Reply)
Discussion started by: cmccabe
1 Replies
Test::Inline::Extract(3pm)				User Contributed Perl Documentation				Test::Inline::Extract(3pm)

NAME
Test::Inline::Extract - Extract relevant Pod sections from source code. DESCRIPTION
The Test::Inline::Extract package extracts content interesting to Test::Inline from source files. METHODS
new $file | $source The "new" constructor creates a new Extract object. It is passed either a file name from which the source code would be loaded, or a reference to a string that directly contains source code. Returns a new "Test::Inline::Extract" object or "undef" on error. elements my $elements = $Extract->elements; The "elements" method extracts from the Pod any parts of the file that are relevant to the extraction and generation process of "Test::Inline". The elements will be either a package statements, or a section of inline unit tests. They will only be returned if there is at least one section of inline unit tests. Returns a reference to an array of package strings and sections of inline unit tests. Returns false if there are no sections containing inline unit tests. TO DO
- For certain very complex cases, add a more intensive alternative parser based on PPI SUPPORT
See the main SUPPORT section. AUTHOR
Adam Kennedy <adamk@cpan.org>, <http://ali.as/> COPYRIGHT
Copyright 2004 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.12.4 2010-11-22 Test::Inline::Extract(3pm)
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy