Hello Experts,
I am back, with another doubt. I am not sure what it relates to this time - awk or the print command actually. I'll explain the scenario:
I have a huge file, and it has some traces(logs). In between those logs, there are statements with some SQL queries. All I want to do is... (4 Replies)
I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work.
sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx
Can anyone give me an alternate solution for the above (2 Replies)
I have a file which will have rows like shown below,
ST*820*316054716
RMR*IV*11333331009*PO*40.31
REF*IV*22234441009*xsss471-2762
DTM*003*091016
ENT*000006
RMR*IV*2222234444*PO*239.91
REF*IV*1234445451009*LJhjlkhkj471-2762 </SPAN>
DTM*003*
091016
RMR*IV*2223344441009*PO*40.31... (18 Replies)
I'm working on a different stage of a project that someone helped me address elsewhere in these threads.
The .docs I'm cycling through look roughly like this:
1 of 26 DOCUMENTS
Copyright 2010 The Age Company Limited
All Rights Reserved
The Age (Melbourne, Australia)
November 27, 2010... (9 Replies)
Hello,
I am new to shell
I have a folder which contains a list of files, all the files contain the separator :
I need to replace this character for all the filenames (by batch)
ex: hello:world should become hello-world
please help
Thanks (3 Replies)
I have 2 files,
file01= 7 columns, row unknown (but few)
file02= 7 columns, row unknown (but many)
now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there
e.g.
file 01
James|0|50|25|10|50|30... (1 Reply)
I can obtain information from itdt inventory command however it display as below, I'd like to print each entity on one line but seperated by :
the file is something like and each section ends with Volume Tag
Drive Address 256
Drive State ................... Normal
ASC/ASCQ... (3 Replies)
Hi Guys,
I have the file
---
HOST_NAME,data_coleta,data_carga,CPU_util,CPU_idle,run_queue,memory,MEMORY_SYSTEM,MEMORY_TOTAL,MEMORY_SWAPIN,MEMORY_SWAPOUT,DISK_READ,DISK_WRITE,DISK_IO,NET_IN_PACKET,
NET_OUT_PACKET... (4 Replies)
Hello ,
Can anyone please help me to solve the below -
Input.txt
source table abc
col1 char
col2 number
source table bcd
col1 date
col2 char
output should be 2 files based on the row separator "source table"
abc.txt
col1 char (6 Replies)
Hi All,
I have a requirement to flatten data out, based on the value in COL_2. Our file is pipe delimited, however COL_2 contains a comma separated string, which we would like to pivot out from one row into multiple rows. Please see my example input data below:
Input Data
... (4 Replies)
Discussion started by: RichZR
4 Replies
LEARN ABOUT DEBIAN
moosex::types::varianttable::declare
MooseX::Types::VariantTable::Declare(3pm) User Contributed Perl Documentation MooseX::Types::VariantTable::Declare(3pm)NAME
MooseX::Types::VariantTable::Declare - Declarative sugar for MooseX::Types::VariantTable based methods.
SYNOPSIS
package Awesome;
use Moose;
variant_method dance => Item => sub {
# Item is the least derived type in the hierarchy,
# every other type subtypes it
# this is in effect a fallback
return "fallback";
};
# a more specific type
variant_method dance => Ballerina => sub {
my ( $self, $ballerina, @args ) = @_;
$ballerina; # a value that passed the TC named "Ballerina"
return "pretty!";
};
# also works with objects
variant_method dance => $type_object => sub { ... };
DESCRIPTION
This module provides declarative sugar for defining Moose::Meta::Method::VariantTable methods in your Moose classes and roles.
These methods have some semantics:
Declaration
The order of the declarations do not matter in most cases.
It is the type hierarchy that defines the order in which the constraints are checked and items dispatched.
However, in the case that two constraints without an explicit relationship between them (one is a subtype of the other) both accept the
same value, the one that was declared earlier will win. There is no way around this issue, so be careful what types you use especially when
mixing variants form many different sources.
Adding the same type to a variant table twice is an error.
Inheritence
When dispatching all of the subclass's variants will be tried before the superclass.
This allows shadowing of types from the superclass even using broader types.
Roles
... are currently broken.
Don't use variant table methods in a role, unless that's the only definition, because in the future variant table merging will happen at
role composition time in a role composition like way, so your code will not continue to work the same.
perl v5.10.1 2011-02-27 MooseX::Types::VariantTable::Declare(3pm)