Some questions around your problem: Does it span months? Does it need to cover month's end? If not, and being exactly as given in your post, try (using mawk on linux):
mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix...
since without that file .. project is not opening..
reply me as soon as possible ... (19 Replies)
My whatis file is missing from my /usr/share/lib directory. I know I can recreate it by using catman -w command.
My question is, why do all of my other servers have it and this one doesn't. Maybe due to a recent move of old to new servers and it just wasn't copied over. Unlikely, 'cause all... (0 Replies)
hi
i am sending an email from unix to windows platform and using uuencode to attach the plain text files (.txt). But when i read the attached file in notepad the linebreaks are gone.
uuencode samplefile.txt samplefile.txt | mail -s "test email" <mailid.com>
if i copy paste the... (6 Replies)
hi team,
i have a file contains data as follows
F1 file
---------------------------
date system name
1-jan-2012 x
1-jan-2012 y
1-jan-2012 x
5-jan-2012 y
3-jan-2012 z
3-jan-2012 z
4-jan-2012 x
4-jan-2012 x
... (13 Replies)
Hi,
I have recently built a new DNS server and created a new zone.
I use an ESMTP server to handle mail and the new domain has been added to this.
I can send mail to gmail and other domain addresses but unable to send it to one particular domain. (DSN:Service Unavailable)
DNS... (2 Replies)
Hello all
I recently installed a fresh copy of Solaris.
I noticed that /etc/passwd does not contain an entry for sysadmin Group #14.
Why isnt it there? Other websites state that by default it should be there !
Help!
Regards,
Junaid
---------- Post updated at 01:04 AM ----------... (1 Reply)
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Issue resolved by upgrading from solaris 11 to solaris 11.1
I would like to enable network mapping.
While using instructions from:
https://blogs.oracle.com/VDIpier/entry/solaris_11_changing_the_hostname
To change my hostname I noticed I am missing the enable mapping bool.
What it should... (0 Replies)
I'd like to have the output from this script piped to a text file that has the date at the beginning of it. For example, my ideal would be something like this
$./run_script.sh
$ls *.out
2013-Feb-26-output_filename.out
Here's the code I'm using.
#! /bin/ksh
DAT=`date '+%Y-%b-%d'`
for... (2 Replies)
Hi Am using unix Aix Ksh
Have Created table called vv
and i have inserted two date
Select * from vv;
Output :-
New_date
21/02/2013
24/02/2013
I have tried Using One query but Unsuccessful so far..
SELECT l.new_date + '1 day' as miss
from vv as l (7 Replies)
Discussion started by: Venkatesh1
7 Replies
LEARN ABOUT DEBIAN
calendar::simple
Calendar::Simple(3pm) User Contributed Perl Documentation Calendar::Simple(3pm)NAME
Calendar::Simple - Perl extension to create simple calendars
SYNOPSIS
use Calendar::Simple;
my @curr = calendar; # get current month
my @this_sept = calendar(9); # get 9th month of current year
my @sept_2002 = calendar(9, 2002); # get 9th month of 2002
my @monday = calendar(9, 2002, 1); # get 9th month of 2002,
# weeks start on Monday
my @span = date_span(mon => 10, # returns span of dates
year => 2006,
begin => 15,
end => 28);
DESCRIPTION
A very simple module that exports one function called "calendar".
calendar
This function returns a data structure representing the dates in a month. The data structure returned is an array of array references. The
first level array represents the weeks in the month. The second level array contains the actual days. By default, each week starts on a
Sunday and the value in the array is the date of that day. Any days at the beginning of the first week or the end of the last week that are
from the previous or next month have the value "undef".
If the month or year parameters are omitted then the current month or year are assumed.
A third, optional parameter, start_day, allows you to set the day each week starts with, with the same values as localtime sets for wday
(namely, 0 for Sunday, 1 for Monday and so on).
date_span
This function returns a cur-down version of a month data structure which begins and ends on dates other than the first and last dates of
the month. Any weeks that fall completely outside of the date range are removed from the structure and any days within the remaining weeks
that fall outside of the date range are set to "undef".
As there are a number of parameters to this function, they are passed using a named parameter interface. The parameters are as follows:
year
The required year. Defaults to the current year if omitted.
mon The required month. Defaults to the current month if omitted.
begin
The first day of the required span. Defaults to the first if omitted.
end The last day of the required span. Defaults to the last day of the month if omitted.
start_day
Indicates the day of the week that each week starts with. This takes the same values as the optional third parameter to "calendar". The
default is 0 (for Sunday).
This function isn't exported by default, so in order to use it in your program you need to use the module like this:
use Calendar::Simple 'date_span';
EXAMPLE
A simple "cal" replacement would therefore look like this:
#!/usr/bin/perl -w
use strict;
use Calendar::Simple;
my @months = qw(January February March April May June July August
September October November December);
my $mon = shift || (localtime)[4] + 1;
my $yr = shift || (localtime)[5] + 1900;
my @month = calendar($mon, $yr);
print "
$months[$mon -1] $yr
";
print "Su Mo Tu We Th Fr Sa
";
foreach (@month) {
print map { $_ ? sprintf "%2d ", $_ : ' ' } @$_;
print "
";
}
A version of this example, called "pcal", is installed when you install this module.
Date Range
This module will make use of DateTime.pm if it is installed. By using DateTime.pm it can use any date that DateTime can represent. If
DateTime is not installed it uses Perl's built-in date handling and therefore can't deal with dates before 1970 and it will also have
problems with dates after 2038 on a 32-bit machine.
EXPORT
"calendar"
AUTHOR
Dave Cross <dave@mag-sol.com>
ACKNOWLEDGEMENTS
With thanks to Paul Mison <cpan@husk.org> for the start day patch.
COPYRIGHT
Copyright (C) 2002-2008, Magnum Solutions Ltd. All Rights Reserved.
LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl, localtime, DateTime
perl v5.10.1 2010-04-02 Calendar::Simple(3pm)