Sponsored Content
Top Forums Shell Programming and Scripting Extracting the lines between 2 strings of a file Post 302107110 by aigles on Wednesday 14th of February 2007 10:27:30 AM
Old 02-14-2007
Another way :
Code:
awk '/FROM/,/WHERE/' file


Jean-Pierre.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting lines from a file

Hi all, I need to extract some lines from a file based on a condition. For ex: My file will contain 50 lines and i need to extract line which has "File" in it and then the line which has "date" in it. Which command will be the most efficient way to do it. I have tried two ways 1.... (1 Reply)
Discussion started by: pradeepthanraj
1 Replies

2. Shell Programming and Scripting

Help with extracting strings from a file

I want to collect the characters from 1-10 and 20-30 from each line of the file and take them in a file in the following format.Can someone help me with this : string1,string2 string1,string2 string1,string2 : : : : (7 Replies)
Discussion started by: cmsdelhi
7 Replies

3. Shell Programming and Scripting

extracting a set of strings from a text file

i have textfiles that contain a series of lines that look like this: string0 .................................................... column3a column4a string1**384y0439 ..................................... column3b column4b... (2 Replies)
Discussion started by: Deanne
2 Replies

4. Shell Programming and Scripting

Extracting lines between 2 strings only if the pattern patches

Hi Friends, Please help me with the following problem: I have an xml file with the following lines: <init-param> <param-name>/default/directory</param-name> <param-value>default</param-value> </init-param> <init-param> ... (5 Replies)
Discussion started by: simran
5 Replies

5. UNIX for Dummies Questions & Answers

extracting lines from a file

i want to extract lines 5 and 7 from a txt file which contains nearly 20 entries how to do it also i want to check whether the 42nd character is 'S' in that line suggestions welcome (4 Replies)
Discussion started by: trichyselva
4 Replies

6. UNIX for Advanced & Expert Users

Extracting Lines in a file

Hi, We have a file where we need to extract the lines of a file based on the first three characters of every line in that file. Eg: RAM hill station SAM student RAM rose SAM apple RAM india SAM australia RAM happy RAM heaven SAM smile RAM glow So, all the lines that start... (5 Replies)
Discussion started by: pyaranoid
5 Replies

7. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

8. Shell Programming and Scripting

Extracting strings from a log file.

I'm new to all this and I've been fiddling with this problem for HOURS and feel silly that I can't work it out! I have a .log file that VERY long and looks like this: 2011-08-31 10:03:34 SUESTART AG Amndmnt Client WebRequest DNU SUEEND Sequence: 600, 2011-08-31 10:03:34 SUESTART... (11 Replies)
Discussion started by: SusieSA
11 Replies

9. Shell Programming and Scripting

Delete lines in file containing duplicate strings, keeping longer strings

The question is not as simple as the title... I have a file, it looks like this <string name="string1">RZ-LED</string> <string name="string2">2.0</string> <string name="string2">Version 2.0</string> <string name="string3">BP</string> I would like to check for duplicate entries of... (11 Replies)
Discussion started by: raidzero
11 Replies

10. UNIX for Beginners Questions & Answers

Extracting strings at various positions of text file

Hi Team - I hope everyone has been well! I export a file from one of our source systems that gives me more information than I need. The way the file outputs, I need to extract certain strings at different positions on the file and echo them to another file. I can do this in batch easily,... (2 Replies)
Discussion started by: SIMMS7400
2 Replies
Tangram::Type::Scalar(3pm)				User Contributed Perl Documentation				Tangram::Type::Scalar(3pm)

NAME
Tangram::Type::Scalar - map scalar fields SYNOPSIS
use Tangram; Tangram::Schema->new( classes => { NaturalPerson => { fields => { string => [ qw( name firstName gender ) ], int => [ qw( age ) ], real => [ qw( height weight ) ], $schema = Tangram::Schema->new( classes => { NaturalPerson => { fields => { string => { name => { sql => 'VARCHAR(100)' }, 1stname => { col => 'firstName', sql => 'VARCHAR(100) NULL' }, gender => undef() }, DESCRIPTION
Classes Tangram::Type::String, ::Int and ::Real and ::Ref are responsible for mapping the various subtypes of scalars. The first three map- pings are documented here since they differ very little. See Tangram::Type::Ref::FromMany for information on mapping references. Tangram::Type::String uses DBI's quote() method to quote strings if that method is available, thus making it possible to store binary objects or multiline text in databases that support it (thanks to Marian Kelc <marian.kelc@ruhr-uni-bochum.de> for suggesting this improve- ment). The three predefined typetags "string", "int" and "real" are for the corresponding Perl scalar subtypes. Each scalar field is stored in a single column of the table associated to the class. The persistent fields may be specified either as a hash or as an array of field names. In the hash form, each entry consists in a field name and an associated option hash. The option hash may contain the following fields: * col * sql * automatic "col" sets the name of the column used to store the field's value. This field is optional, it defaults to the persistent field name. Over- ride if the field name is not an acceptable SQL column name. "sql" sets the SQL type of the column. Used by Schema::deploy() when initializing a database. Defaults to 'VARCHAR(255) NULL' for strings, 'INT NULL' for ints and 'REAL NULL' for reals. "automatic", if set to true, tells Tangram not to save the field to storage. This is useful for auto-increment or timestamp columns. The persistent fields may also be specified as an array of strings, in which case the defaults are used. perl v5.8.8 2006-03-29 Tangram::Type::Scalar(3pm)
All times are GMT -4. The time now is 03:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy