I view fields as objects that are horizontally delimited and not in a fixed position, like drl.
I remember fields from FORTRAN and some versions of BASIC. Now the main driver seems to be portability of data files from UNIX into Excel.
UNIX uses field separators:
sort has a notion of fields delimited by -t [character].
from man sort for GNU sort
awk has had FS from its inception.
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi,
I'm dealing with an issue and losing a lot of hours figuring out how i would solve this.
I have an input file which looks like this:
('BLABLA +200-GRS','Serviço ','TarifaçãoServiço','wap.bla.us.0000000121',2985,0,55,' de conversão em escada','Dia','Domingos')
('BLABLA +200-GRR','Serviço... (6 Replies)
Hi Experts,
I have a string with colon delimited, want 2nd colon to be changed to a pipe.
data:
101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:
I am trying with sed, but can change only 1 occurance:
echo "101:8:43:4:72:14:41:69:85:3:137:4:3:0:4:0:9:3:0:3:12:3:" | sed 's/:/|/2'... (5 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT DEBIAN
tangram::type::hash::scalar
Tangram::Type::Hash::Scalar(3pm) User Contributed Perl Documentation Tangram::Type::Hash::Scalar(3pm)NAME
Tangram::Type/Hash/Scalar - map Perl hash of scalar keys and values
SYNOPSIS
use Tangram::Core;
use Tangram::Type/Hash/Scalar; # always
$schema = Tangram::Schema->new(
classes => { NaturalPerson => { fields => {
flat_hash =>
{
opinions =>
{
table => 'NP_ops',
key_sql => 'VARCHAR(10)',
type => 'int',
sql => 'NUMERIC(1)',
},
lucky_numbers => 'int', # use defaults
}
DESCRIPTION
Maps references to a Perl hash. The persistent fields are grouped in a hash under the "flat_hash" key in the field hash.
The hash may contain as keys and values only 'simple' scalars like integers, strings or real numbers. It may not contain references. For
hashs of objects, see Tangram::Type::Hash::FromMany and Tangram::Type::Hash::FromOne.
Tangram uses a table to save the state of the collection. The table has three columns, which contain
* the id of the container object
* the key of the element in the hash
* the value of the element
The field names are passed in a hash that associates a field name with a field descriptor. The field descriptor may be either a hash or a
string. The hash uses the following fields:
* key_type
* key_sql
* type
* sql
* table
The optional fields "key_type" and "type" specify the key and value types of the hash. If the type is "string" Tangram quotes the values as
they are passed to the database. Not specifying a "type" is exactly equivalent to specifying "string".
Optional field "table" sets the name of the table that contains the elements. This defaults to 'C_F', where C is the class of the contain-
ing object and F is the field name.
The optional fields "key_sql" and "sql" specify the type that deploy() (see Tangram::Deploy) should use for the column containing the key
and value of the hash. If this field is not present, the SQL type is derived from the "type" field: if "type" is "string" (or is absent)
VARCHAR(255) is used; otherwise, the "type" field is interpreted as a SQL type.
If the descriptor is a string, it is interpreted as the value of the "type" field and all the other fields take the default value.
AUTHOR
This mapping was contributed by Gabor Herr <herr@iti.informatik.tu-darmstadt.de>
perl v5.8.8 2006-03-29 Tangram::Type::Hash::Scalar(3pm)