10-11-2010
Hi there,
This doesn't solve my problem, I need to be able to sort on the "Message Type", then the "Hostname" then the column.
Regards, Wynford
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi ,
I need to sort a file based on multiple columns All the columns are of varchar type
can any one give me the command to sort for varchar columns?
Thanks (3 Replies)
Discussion started by: laxmi131
3 Replies
2. UNIX for Dummies Questions & Answers
Please help to sort columns in this file:
a b d f c e
1 4 10 16 7 13
2 5 11 17 8 14
3 6 12 18 9 15
I need to sort COLUMNS (so sort command doesn't work) like this:
a b c d e f
1 4 7 10 13 16
2 5 8 11 14 17
3 6 9 12 15 18
I know sed can do it but don't know how... :( (7 Replies)
Discussion started by: coppuca
7 Replies
3. Shell Programming and Scripting
Hi, Please I need urgent help in sorting below data, I had similar post but there was a kind of space in between the data but now there is no space and I have tried adjusting the old script to work but it didn't.
here are the data;
traceroute to 2001:1ba0:2a0:5965:0:30:24:1... (6 Replies)
Discussion started by: sam127
6 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I'm using Solaris 10, and need help in sorting the below output from the syslog file in descending rather than ascending order.
I would like both the hostname and message columns to be sorted, but right now only the message is sorted and the count column, whose order I would like... (2 Replies)
Discussion started by: wthomas
2 Replies
5. Shell Programming and Scripting
Hi,
We have a requirement of need to sort a file based on fields 1,3 and 4. I tried with sort command however it is not giving expected output, can we achieve any other way? Please let me know ASAP.
File
a e w a
a b a a
a a d g
a a h h
c d a e
a a a w
Output
a b a a
a a a w
a a d... (4 Replies)
Discussion started by: Nagapandi
4 Replies
6. UNIX for Dummies Questions & Answers
I have a space delimited text file that I would like to sort by multiple columns. First I want to sort by column 1, then by column 2. Both columns are numerical. Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have a text file that has four columns (Logonid,First Name,Last Name,Status)
Logonid First Name Last Name Status
abc2 Fred Mercury Inactive
abc1 John Deacon Active
abc3 Roger Taylor Active
abc4 Brian ... (2 Replies)
Discussion started by: theref
2 Replies
8. Shell Programming and Scripting
Hello!
So ive been presented with this comma-delimited file:
I need a print to look as below
"
lastname, phone_number, zip
for every person with a last name starting with the letter H, I
only with a 650-area code phone number. output should be sorted by reverse ZIP code "
I only have... (5 Replies)
Discussion started by: strangemachine
5 Replies
9. Shell Programming and Scripting
Hi, I have a tab delimited columnar file where I want to remove lines wherever two particular columns match. so for this file, I want to toss the lines where columns 1 and 2 match:
a a 1 3
a b 2 4
b b 3 5
because there are matches column 1 and 2 in lines 1 and 3, I would like a script to... (2 Replies)
Discussion started by: mikey11415
2 Replies
10. Shell Programming and Scripting
I have a file which contains following lines:
0114714710147 09013 00025.00D986532147
2814714710147 09013 00045.00D985532147
Now, I need to sort the file with above bold and colured one. Means:
first sorting will be done by: 147147 then by 10147 09013 after that by 986532147.
The... (2 Replies)
Discussion started by: George1234
2 Replies
LEARN ABOUT DEBIAN
tangram::type::dump::any
Tangram::Type::Dump::Any(3pm) User Contributed Perl Documentation Tangram::Type::Dump::Any(3pm)
NAME
Tangram::Type::Dump::Any - Intuitive DataBase InterFace
SYNOPSIS
# ... in a nearby Tangram::Schema structure ...
SomeClass =>
{ fields =>
{ idbif => {
-options => { dumper => 'Data::Dumper',
},
some_field => undef,
some_property => undef,
some_attribute => undef,
each_one => undef,
gets => undef,
saved => undef,
},
string => {
cheese => undef,
},
},
};
DESCRIPTION
The idbif mapping type collates multiple data members into a single perl_dump (see Tangram::Type::Dump::Perl), storable (see Tan-
gram::Type::Dump::Storable) or yaml (see Tangram::Type::Dump::YAML) column.
For instance, with the schema definition in the example, all the columns in the example would be serialised via Data::Dumper.
If you stored an object like this:
$cheese = bless { cheese => "gouda",
gets => 6,
each_one => 9 }, "SomeClass";
You would see something in your database similar to:
/^'--v------v--------v----------------------------'^
| id | type | cheese | idbif |
>----o------o--------o------------------------------<
| 1 | 42 | gouda | { gets => 6, each_one => 9 } |
\_,--^------^--------^----------------------------._/
(note: the actual output from your SQL Database client may differ from the above)
So, if you're the sort of person who likes to set their attributes with accessors, but doesn't like the overhead this places on the
RDBMS... then this may help. Note: the real benefits of this mapping type are for when you're storing more complex data structures than
"6" and "9" :-).
You may prefer to use the default dumping type, which is storable.
LINKS TO OTHER OBJECTS
If Tangram encounters another object which is already in storage (ie, has been inserted via "$storage->insert($foo)"), then it will store a
"Memento". This memento includes the object ID, which is sensitive to schema changes (the ordering of classes in the schema).
If the class implements a "px_freeze" and "px_thaw" function, then there will be a "Memento" that includes the class name of the object,
and the data that was returned by the class' "px_freeze" method. To be reconstituted, it is called as:
SomeClass->px_thaw(@data)
See Tangram::Type::Dump for more details on the complicity API.
Please set RETVAL to be the thawed object. (that is, return a single scalar).
BUT, I REALLY, REALLY HATE SCHEMAS!
However, maybe you are one of those folk who don't like to declare their attributes, instead peppering hashes willy nilly, then there is
another option.
Instead of explicitly listing the fields you want, if you don't specify any fields at all, then it means save ALL remaining fields into the
column. For convenience, "-poof" is provided as a synonym for "-options", so you can write:
{ fields =>
{ idbif => { -poof => # There goes another one!
{
},
}
},
}
[ You see, Tangram::Type::Dump::Any isn't actually an intuitive DB interface. No, an intuitive DB interface is a user interface component,
and that title is reserved for Visual Tangram. VT expects to pick up the title with any luck by the end of the 21st century^W RSN!
I Don't Believe In Fairies is actually what it stands for. It's a completely arbitrary name; chosen for no reason at all, and certainly
not anything to do with Pixie. ]
perl v5.8.8 2006-03-29 Tangram::Type::Dump::Any(3pm)