Hi,
Currently I am coding up a nasty way of reading file input using *cat* rather than *read*. My text input looks like
TextA 100
TextB 110
TextC 120
Currently I am using cat |while read line to read the first column and second column fields.
cat foo.txt|while read line
do
... (1 Reply)
Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output file as follows
If field3 in file1 is same as field3 in the next line then the field4 should add... (1 Reply)
Hello,
I have a file with two fields. The first field repeats itself for quite a while but the second field changes. What I want to do is to go through the first column until its value changes (and while it doesn't, verify that the second field is in a sequence from 0-15).
Example input:
... (13 Replies)
Hi Friends,
I am new to Shell Scripting and need your help in the below situation.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- "Application handle" is the common field in both the files.
(NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Hi
I have 2 files as below
File 1
Chr Start End
chr1 120 130
chr1 140 150
chr2 130 140
File2
Chr Start End Value
chr1 121 128 ABC
chr1 144 149 XYZ
chr2 120 129 PQR
I would like to compare these files using awk; specifically if column 1 of file1 is equal to column 1 of file2... (7 Replies)
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Hi all,
I am new to using awk and am quickly discovering what a powerful pattern-recognition tool it is. However, I have what seems like a fairly basic task that I just can't figure out how to perform in one line. I want awk to find and print all the lines in which one of multiple patterns (e.g.... (8 Replies)
I have a fileA with one column (1000 rows), and fileB with 26 columns(13000 rows).
I need to search each value of fileA with fileB and return all the 26 values from FileB to a new file- File C if matches. The search value (from FileA) may present in any of the 26 values in FileB. This value is not... (7 Replies)
Hi guys,
I have problem to append new data at the end of each line of the files where it takes whole value of the nth column. My expected result i just want to take a specific value only. This new data is based on substring of 11th, 12th 13th column that has comma seperated value.
My code:
awk... (4 Replies)
Hi,
I'm struggling with a problem at the minute. Basically, I have a file with >1000 columns / fields (with headers), each containing a variable number of values. I would like to stack each column such that all the data appears in a single column, e.g. the first value of column 2 is moved to... (5 Replies)
Discussion started by: TAlcock
5 Replies
LEARN ABOUT DEBIAN
tangram::type::dump::storable
Tangram::Type::Dump::Storable(3pm) User Contributed Perl Documentation Tangram::Type::Dump::Storable(3pm)NAME
Tangram::Type::Dump::Storable - map any Perl object as scalar dump via Storable
SYNOPSIS
use Tangram::Core;
use Tangram::Type::Dump::Storable; # always
$schema = Tangram::Schema->new(
classes => { NaturalPerson => { fields => {
storable =>
{
diary => # diary is a perl hash
{
col => 'diarydata',
sql => 'BLOB',
indent => 0,
terse => 1,
purity => 0
},
lucky_numbers => 'int', # use defaults
}
DESCRIPTION
Maps arbitrary Perl data structures by serializing to a string representation. The persistent fields are grouped in a hash under the
"storable" key in the field hash.
Serialization is done by Storable::freeze, which traverses the Perl data structure and creates a binary representation of it. The resulting
string will be mapped to the DBMS as a scalar value. During restore, the scalar value will be restored with Storable::thaw to reconstruct
the original data structure.
The structure should be able to contain pretty much anything that may be safely dumped by Storable. However, be aware that Tan-
gram::Type::Dump::flatten() must be able to find the persistent objects in the field. Unless you're using classes that are implemented in
C and contain other objects, you should be fine (Set::Object has a special work-around).
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:
* col
* sql
* indent
* terse
* purity
The optional fields "col" and "sql" specify the column name and the column type for the scalar value in the database. If not present, "col"
defaults to the field name and "sql" defaults to VARCHAR(255). Values will be always quoted as they are passed to the database.
The remaining optional fields control the serialization process. They will be passed down to Data::Dumper as values to the corresponding
Data::Dumper options. The default settings are: no indentation ("indent=0"), compact format ("terse=1"), and quick dump ("purity=0").
AUTHOR
This mapping was contributed by Gabor Herr <herr@iti.informatik.tu-darmstadt.de>
perl v5.8.8 2006-03-29 Tangram::Type::Dump::Storable(3pm)