suppose if u have a file like that
Hen ABCCSGSGSGJJJJK 15
Cock ABCCSGGGSGIJJJL 15
* * * * * * : * * * . * * * :
Hen CFCDFCSDFCDERTF 30
Cock CHCDFCSDHCDEGFI 30
* . * * * * * * * : * * :* : : .
The output shud be
where there is : and .
It shud... (4 Replies)
I am faced with a :confused: tricky problem to parse a data file ( May not be a tricky problem to the scripting guru's ).
Here is what I am faced with. I have a file with multiple rows of data and the rows are not of fixed length. "|" is used as a delimiters for individual columns and each row... (3 Replies)
Hi,
I am a newbie to unix/shell scripting and i have a question on how to parse a txt file using perl in a sh script. I have a txt file that contains hundreds of lines with data like this....
X, Y, Latitude, Longitude
1, 142, -38.000000, -91.000000, 26.348
2, 142, 60.000000, -90.000000,... (2 Replies)
Hi
I am using shell script and i need to parse the data between parenthesis.How do i do it using shell script.
Ex: section(name).
I want to extract name from the above string using shell script. (4 Replies)
I have a script with few pre defined variables.
Also have a config file. Something like this.
# config file
# Define Oracle User
MOD1_TAG=abcde
MOD2_TAG=xyzabc
MOD3_TAG=def
I need to parse the config file and have each of the value copied to different variables.
Please suggest what... (1 Reply)
Hi Experts,
I have a data with multiple entry , I want to filter PKG= & the last column "00060110" or "00088150" in the output
file:
###############################################################################################
PKG= P8SDB :: VGS = vgP8SOra vgP8SDB1 vgP8S001... (5 Replies)
data.txt:
CRITICAL: iLash: 97.00%, SqlPlus: 99.00%. Warning/critical thresholds: 95/98%
I need to pull only the disknames:
iLash and SqlPlus
The following command will only pull iLash:
echo "CRITICAL: iLash: 97.00%, SqlPlus: 99.00%. Warning/critical thresholds: 95/98%" | awk -F":"... (7 Replies)
The below awk parser works for most data inputs, but I am having trouble with the last one. The problem is in the below rules steps 1 and 2 come from $2 (NC_000013.10:g.20763686_20763687delinsA) and steps 3 and 4 come from $1 (NM_004004.5:c.34_35delGGinsT).
Parse Rules:
The header is... (0 Replies)
i run command that return this result,example :
gigabitethernet2/2/4:NotPresent, gigabitethernet2/1/17:UP, gigabitethernet2/1/10:UP, gigabitethernet2/1/5:UP,
gigabitethernet2/1/9:UP, gigabitethernet2/1/36:DOWN, gigabitethernet2/1/33:DOWN, gigabitethernet2/1/8:UP,... (19 Replies)
I am trying to rearrange stacked columns.
Below is an excerpt of my data file:
You can see there are two data columns stacked vertically.
ITERATION ... (1 Reply)
Discussion started by: sav0
1 Replies
LEARN ABOUT MOJAVE
datetime::timezone::local
DateTime::TimeZone::Local(3) User Contributed Perl Documentation DateTime::TimeZone::Local(3)NAME
DateTime::TimeZone::Local - Determine the local system's time zone
VERSION
version 1.63
SYNOPSIS
my $tz = DateTime::TimeZone->new( name => 'local' );
my $tz = DateTime::TimeZone::Local->TimeZone();
DESCRIPTION
This module provides an interface for determining the local system's time zone. Most of the functionality for doing this is in OS-specific
subclasses.
USAGE
This class provides the following methods:
DateTime::TimeZone::Local->TimeZone()
This attempts to load an appropriate subclass and asks it to find the local time zone. This method is called by when you pass "local" as
the time zone name to "DateTime:TimeZone->new()".
If your OS is not explicitly handled, you can create a module with a name of the form "DateTime::TimeZone::Local::$^O". If it exists, it
will be used instead of falling back to the Unix subclass.
If no OS-specific module exists, we fall back to using the Unix subclass.
See DateTime::TimeZone::Local::Unix, DateTime::TimeZone::Local::Win32, and DateTime::TimeZone::Local::VMS for OS-specific details.
SUBCLASSING
If you want to make a new OS-specific subclass, there are several methods provided by this module you should know about.
$class->Methods()
This method should be provided by your class. It should provide a list of methods that will be called to try to determine the local time
zone.
Each of these methods is expected to return a new "DateTime::TimeZone" object if it determines the time zone.
$class->FromEnv()
This method tries to find a valid time zone in an %ENV value. It calls "$class->EnvVars()" to determine which keys to look at.
To use this from a subclass, simply return "FromEnv" as one of the items from "$class->Methods()".
$class->EnvVars()
This method should be provided by your subclass. It should return a list of env vars to be checked by "$class->FromEnv()".
$class->_IsValidName($name)
Given a possible time zone name, this returns a boolean indicating whether or not the name looks valid. It always return false for "local"
in order to avoid infinite loops.
EXAMPLE SUBCLASS
Here is a simple example subclass:
package DateTime::TimeZone::SomeOS;
use strict;
use warnings;
use base 'DateTime::TimeZone::Local';
sub Methods { qw( FromEnv FromEther ) }
sub EnvVars { qw( TZ ZONE ) }
sub FromEther
{
my $class = shift;
...
}
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Dave Rolsky.
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 2013-10-28 DateTime::TimeZone::Local(3)