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)
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)
i have textfiles that contain a series of lines that look like this:
string0 .................................................... column3a column4a
string1**384y0439 ..................................... column3b column4b... (2 Replies)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
tangram::type::scalar
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)