Hi,
I need to unload some data from Informix database into text file.
But what happen is when i open the text file, some record split into 2 line, become uncomplete.
I had checked is due to some unregconized space in particular fields, i used many way to detect this unregconized space, but... (3 Replies)
Hello
I have a file with data something like this in it :
texttexttext "text .lst" TEXT=" text "
texttexttext "moretext .lst" TEXT=" text "
Question is how do I get rid of space so that the files looks like this :
texttexttext "text.lst" TEXT="text"
texttexttext... (8 Replies)
Hello Folks..
I need your help ..
here the example of my problem..i know its easy..i don't all the commands in unix to do this especiallly sed...here my string..
dwc2_dfg_ajja_dfhhj_vw_dec2_dfgh_dwq
desired output is..
dwc2_dfg_ajja_dfhhj
it's a simple task with tail... (5 Replies)
Hi guys,
I am new to shell scripting and I have a small problem...If someone can solve this..that would be great
I am trying to form a XML by reading a flat file using shell scripting
This is my shell script
LINE_FILE1=`cat FLEX_FILE1.TXT | head -1 | tail -1`
echo... (1 Reply)
I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation?
Here is my query:
cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}'
02:00:00... (1 Reply)
Hi Perl users,
I have another problem with text processing in Perl. I have a file below:
Linux Unix Linux Windows SUN
MACOS SUN SUN HP-AUX
I want the result below:
Unix Windows SUN
MACOS HP-AUX
so the duplicate string will be removed and also the keyword of the string on... (2 Replies)
I want to delete all matches in a text following this pattern:
Each match starts with linux-
Each match ends with a space
(Remove linux-* until immediate next space)
EXAMPLE:
From this text:
ibudev1 libudev1 libweather-ion7 libxatracker2 linux-generic linux-headers-generic... (4 Replies)
MooseX::Singleton(3) User Contributed Perl Documentation MooseX::Singleton(3)NAME
MooseX::Singleton - turn your Moose class into a singleton
VERSION
version 0.29
SYNOPSIS
package MyApp;
use MooseX::Singleton;
has env => (
is => 'rw',
isa => 'HashRef[Str]',
default => sub { \%ENV },
);
package main;
delete MyApp->env->{PATH};
my $instance = MyApp->instance;
my $same = MyApp->instance;
DESCRIPTION
A singleton is a class that has only one instance in an application. "MooseX::Singleton" lets you easily upgrade (or downgrade, as it
were) your Moose class to a singleton.
All you should need to do to transform your class is to change "use Moose" to "use MooseX::Singleton". This module uses metaclass roles to
do its magic, so it should cooperate with most other "MooseX" modules.
METHODS
A singleton class will have the following additional methods:
Singleton->instance
This returns the singleton instance for the given package. This method does not accept any arguments. If the instance does not yet exist,
it is created with its defaults values. This means that if your singleton requires arguments, calling "instance" will die if the object has
not already been initialized.
Singleton->initialize(%args)
This method can be called only once per class. It explicitly initializes the singleton object with the given arguments.
Singleton->_clear_instance
This clears the existing singleton instance for the class. Obviously, this is meant for use only inside the class itself.
Singleton->new
This method currently works like a hybrid of "initialize" and "instance". However, calling "new" directly will probably be deprecated in a
future release. Instead, call "initialize" or "instance" as appropriate.
BUGS
Please report any bugs or feature requests to "bug-moosex-singleton@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. We
will be notified, and then you'll automatically be notified of progress on your bug as we make changes.
SOME CODE STOLEN FROM
Anders Nor Berle <debolaz@gmail.com>
AND PATCHES FROM
Ricardo SIGNES <rjbs@cpan.org>
AUTHOR
Shawn M Moore <sartak@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Shawn M Moore.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.18.2 2011-12-08 MooseX::Singleton(3)