set DAY=`date +%y%m%d`
set H=`date +%H`
set M=`date +%M`
mailx -s "$H-Mydata" myemail@mail.com<mydata
I am looking to set the current hour to have 1 hour less in the subject header:
For example: let's say the system time is 8
I want to have "7-Mydata" not "8-Mydata"
Can some1... (6 Replies)
My program:
__________________________________
#!/bin/ksh
DAY=`date +%y%m%d`
H=`date +%H`
M=`date +%M`
day=`date +%m/%d/%y`
let h=$H-1
echo DAY $DAY
echo H $H
echo M $M
echo day $day
echo h $h
_____________________________________
My result: (3 Replies)
i have this script that checks for yesterday date and also specific hour in that
-----------------------------------------------------------------
TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d %k`
cd logs
count=0
for i in DBMaint.log
do
cat $i | grep $a >> file12.txt
done... (0 Replies)
I had some free time at work today so I decided to get a little practice with my shell scripts (I'm pretty new to the whole UNIX thing).
I'm sure I'm not the only college student here so maybe this code will come in handy for future weekends.
#!/bin/sh
if
then
echo "No playlist... (0 Replies)
I have a log like this:
Jan 26 13:59:41 server2 ntpdate: step time server 91.189.94.4 offset 0.065456 sec
Jan 26 13:59:41 server2 ntpd: ntpd 4.2.4p8@1.1612-o Fri Aug 6 22:49:54 UTC 2010 (1)
Jan 26 13:59:41 server2 ntpd: precision = 1.000 usec
Jan 26 13:59:41 server2 ntpd: ntp_io: estimated max... (2 Replies)
The requirement is, i need to search for the logs for particular duration. The logs are in the format
logfilename.2011-04-05-00
logfilename.2011-04-05-01
logfilename.2011-04-05-02
logfilename.2011-04-05-03
.
.
.
.
logfilename.2011-04-05-18
.
.
.
logfilename.2011-04-05-23
the time... (6 Replies)
I want to remove commands having no output. In below text file.
bash-3.2$ cat abc_do_it.txt
grpg10so>show trunk group all status
grpg11so>show trunk group all status
grpg12so>show trunk group all status
GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Hi friends, I want to convert 24 hour timing to 12 hour please help me...
my data file looks like this..
13-Nov-2011 13:27:36 15.32044 72.68502
13-Nov-2011 12:08:31 15.31291 72.69807
16-Nov-2011 01:16:54 15.30844 72.74028
15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Hi guys
I want any script to get me next hour
For example
Nexthour.sh 2013022823
It get me result
2013030100
Thanks a lot , I'm using Solaris 10 (5 Replies)
I want to get CPU average value only (not required user CPU & memory) with each hours on individual date. The sample output is below
| | | User |Memory| User |
Date | Time |CPU %|CPU % | % |Mem % |
03/02/2015|00:00:00| 24.56| 20.66| 89.75| 63.48|... (13 Replies)
Discussion started by: Saravanan_0074
13 Replies
LEARN ABOUT DEBIAN
lunar
lunar(1) General Commands Manual lunar(1)NAME
lunar (version 2.2) - a calendar conversion utility
SYNTAX
lunar [ -h ] [ -b ] [ -i ] [ -l ] year month day [ hour ]
DESCRIPTION
The program performs date conversion between the Gregorian Solar Calendar (SC) and the Chinese Lunar Calendar (LC). Given a date in either
calendar, the program also outputs the corresponding "shengxiao" (animal of the year) and "ganzhi" characters. The date range currently
covered is from about 1900 A.D. to 2049 A.D.
For the sake of convenience, we choose the convention such that the solar and lunar year numbers of the first day of a lunar year are the
same. For example, SC 1991.2.15 is LC 1991.1.1, while SC 1991.2.14 is LC 1990.12.30. Moreover, we choose the convention such that the
solar and lunar hour numbers (in 24-hour clock) of a date are the same, although a lunar day starts at 23:00 of a solar day. This means
that SC 1991.2.15.23 is LC 1991.1.2.23, while SC 1991.2.16.0 is LC 1991.1.2.0, and SC 1991.2.16.1 is LC 1991.1.2.1.
The standard time of the Lunar Calendar is Beijing (Hong Kong) Standard Time, not GMT. Be sure to adjust appropriately for other time
zones and "Daylight Saving Time".
In the Lunar Calendar, a normal year has 12 months, and a leap year (run-nian) has 13 months, where the extra month is called a "leap
month" (run-yue). For example, the leap month that follows immediately the 6-th lunar month is called the 6-th leap month. A (leap) month
is either a short or long one, which has 29 or 30 days respectively.
There are 10 gan's and 12 zhi's. The ganzhi labeling of the year, month, day and hour of a date is a member of the Cartesian product
GxGxGxG, where G = {1,2,...,60}. For example, "jia-zi" is 1, "yi-chou" is 2, and so on. The ganzhi of the j-th leap month is the same as
that of the j-th month.
The possible options are
b output ganzhi in special "bitmap" characters.
h output hanzi or Chinese characters encoded in (highest-bit-set) GB code.
i convert a lunar date to solar date. The default is to convert a solar date to a lunar date.
l indicate the month is a lunar leap month. This option is meaningful only when the "-i" option is used.
COPYRIGHT
Copyright (C) 1988, 1989, 1991, 1992, 2001 Fung F. Lee and Ricky Yeung
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The last version of this program was released on July 23, 1992 as version 2.1a. This program was first released under the terms of GNU GPL
on October 28, 2001 as version 2.2. Both versions are identical except for the license text.
AUTHORS
Fung F. Lee and Ricky Yeung
ACKNOWLEDGEMENT
The special "bitmap" file "lunar.bitmap" was contributed by Weimin Liu.
Special thanks to Hwei Chen Ti who extended the tables from 2001 to 2049.
BUGS
Bug reports and comments should be sent to lee@umunhum.stanford.edu.
DISCLAIMER
This software has no connection with our employers.
28 October 2001 lunar(1)