You can modify the timezone (the TZ environment variable) to get arbitrary times. See the following example:
It could be better with not using the export command:
I'm not sure this syntax is portable but it helps modifying variables only for the following command. It works in bash and ksh
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 REDHAT
install-datebook
install-datebook(1) General Commands Manual install-datebook(1)NAME
install-datebook - installs a new datebook entries onto your Palm handheld device
SYNOPSIS
For serial devices, the -p <port> option is required, or you may use the $PILOTPORT environment variable:
install-datebook -p /dev/ttySX filename [filename filename ...]
For USB devices, the new USB port specification is:
install-datebook -p usb:/dev/ttyUSBX filename [filename filename ...]
DESCRIPTION
install-datebook allows the user to write one or more datebook entries from one or more source files. Once install-datebook is started, the
user must invoke HotSync on the target device by pressing the HotSync button on the cradle or by tapping on the HotSync icon in the Palm
launcher.
The format of the source file contains one datebook entry on line, containing four tab separated fields. The fields are start date/time,
end date/time, alarm settings, and the description of datebook entry. This program doesn't yet support repeted entries. The date and time
must be in format understand by parsedate.y. At the very least, the following two formats are understood:
August 11, 1997 0800 GMT+300
1997/08/11 08:22:33 GMT+300
If either one of the date and time fields is empty, the entry is installed without time. If the alarm field is empty, the entry is
installed without setting any alarms. The alarm field can contain numbers followed by "m" (minutes), "h" (hours), or "d" (days).
Here are some example lines ("<TAB>" = tab, "<NL>" = newline in these examples):
-> 1997/08/11 0800 GMT+300 <TAB> 1997/08/11 0900 GMT+300 <TAB> <TAB> IETF Registration <NL>
-> August 11, 1997 0900 GMT+300 <TAB> August 11, 1997 0930 GMT+300 <TAB> 2m <TAB> Introductions <NL>
OPTIONS
none
USAGE
The program will connect to the target Palm device, and write the datebook-formatted file given on the command line onto the Palm into the
DatebookDB.pdb file.
KNOWN BUGS
If no timezone is given, install-datebook will assume the time is in GMT and it will convert it to localtime. If you don't want to write
timezone entries to all begin and end times, set the TZ environment variable to GMT before running this program.
REPORTING BUGS
Report bugs at http://bugs.pilot-link.org/
AUTHOR
install-datebook was written by Tero Kivinen <kivinen@iki.fi>. This program was based on install-todos program written by Robert A. Kaplan
<kaplan@openmarket.com>.
SEE ALSO Free Software Foundation Palm Computing Device Tools install-datebook(1)