05-25-2009
what have you tried till now??
HINT:convert the time stamps in min then subtract and convert them back to hours
try to impliment this logic..
10 More Discussions You Might Find Interesting
1. AIX
I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
Discussion started by: achu
1 Replies
2. Shell Programming and Scripting
Hello,
I've created the script below to compare the content of two files with a delay of an hour. After an hour, the lines that exist in both files, will be printed and executed.
The script now uses a counter to countdown 50 minutes. But what I would prefer is to check the file timestamp of... (3 Replies)
Discussion started by: taipan
3 Replies
3. UNIX for Advanced & Expert Users
Normally we can use %s to find out the time in second since 1970.
But in my ksh, this format option is not available.
Example- date +%s
1268103151
above script command won't work in ksh. Can you guys provide its equivalent ? (3 Replies)
Discussion started by: boy18nj
3 Replies
4. Shell Programming and Scripting
I'm trying to compare 2 dates between current time and the timestamp on a file.
The date format is mmdd
Both return Apr 1 but when using if statement
line 11: Apr 1: command not found error is returned
#!/bin/sh
log="DateLog"
Current_Date=`date +%b%e`
Filepmdate=`ls -l /file.txt |... (1 Reply)
Discussion started by: cillmor
1 Replies
5. Shell Programming and Scripting
Hello - I have written the following basic shell script to count files, compare files and look for a particular strings in a file.
Problem 1: How do I define more than 1 file location?
#!/bin/bash
#this is a test script
FILES=$(ls /home/student/bin/dir1, home/student/bin/dir2)... (0 Replies)
Discussion started by: DallasT
0 Replies
6. UNIX and Linux Applications
Hi
I have a table with name, date in format DD.MM.YYYY.
I need to something like this (I try to explain in pseudo code)
if SYSDATE (current date) minus 6 months > $expiry date
print OK
else print NOK with $name and $expiry date
I know this is possible with Oracle. How to do this... (0 Replies)
Discussion started by: slashdotweenie
0 Replies
7. AIX
Hello to all.
I work at AIX system without perl installed and I am restricted user, so I am limited to bash. In script that I am writing, I have to read line from file and transform date that I found inside to Unix timestamp. Line in file look something like this:
Tue Mar 29 06:59:00... (5 Replies)
Discussion started by: Hyperborejac
5 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
Discussion started by: mailsara
2 Replies
9. Shell Programming and Scripting
Hi Friends,
I have the following logfile. Currently time in india is 07/31/2014 12:33:34 and i have the following content in logfile. I want to display only those entries which contain string 'Exception' within last 3 hours. In this case, it would be the last line only
I can get the... (12 Replies)
Discussion started by: srkmish
12 Replies
10. Shell Programming and Scripting
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT DEBIAN
gpx2shp
gpx2shp(1) gpx2shp(1)
NAME
gpx2shp - Convert GPX files to ESRI Shape file
SYNOPSIS
gpx2shp [options] [-o output file] gpxfile
DESCRIPTION
gpx2shp is a converter from GPX file to ESRI/Shape file. This is a output of Metro Manila Transit Map Project by JOCV (Japan Overseas
Cooperation Volunteers) program of JICA (Japan International Cooperation Agency) in 2004. It is provided you on GPL2.
OPTIONS
-o, --output
Sets output basename. The default is (source file name) - (extention name)
-w, --waypoints
Converts only waypoints data from a gpx file.
-t, --trackpoints
Converts only trackpoints data from a gpx file.
-r, --routes
Converts only routes data from a gpx file.
-a, --all
Converts all types of data from a gpx file.(default)
-e, --as-edge
Makes a separated output by each edges.
-p, --as-point
Makes a separated output by each points.
-s, --stats
Shows simple statistics of the outputs.
-b, --basic-columns
Stores only basic data as attribures to reduce memory and storage usage. (ele, name, cmt, type, time, fix, sym and number).
-L, --no-length
Removes length column from a waypoint or trackpoint attribute table.
-S, --no-speed
Removes speed column from a waypoint or trackpoint attribute table.
-T, --no-time
Removes time column from an attribute table.
-g, --gpxline
Adds line number of GPX file as attribures.
-f, --fast
Make it faster without any checks.
-3, --3d
Converts data using 3d format. (It's not compatible for Arcview 3.x.)
--min-points
Sets path minimum points to convert for noise reduction. Default is 2.
--min-length
Sets path minimum length to convert for noise reduction. Default is 0.
--min-time
Sets path minimum time period to convert for noise reduction. Default is 0.
--length-unit
Sets length unit from m,km,feet,mi and etc. The default is m. You can see the unit list from "geod -lu" command.
--time-unit
Sets time unit. The default is sec. You can set from day, hour, min and sec.
--speed-length-unit
Sets length unit for speed. The default is km. You can see the unit list from "geod -lu" command.
--speed-time-unit
Sets time unit for speed calulation. Default is hour. You can set from day, hour, min and sec.
--length-ellipsoid
Sets length ellipsoid like UGS84, clrk66. The default is UGS84. You can see the unit list from "geod -le" command.
-v, --verbose
Gives many messages.
--version
Shows version.
-h, --help
Shows this list.
AUTHORS
Toshihiro Hiraoka
Petter Reinholdtsen
BUGS or OPINIONS
Please e-mail your bugs or opinions to
washitoshi at yahoo.co.jp
SEE ALSO
gpx2shp / gps2shp homepage
http://gpx2shp.sourceforge.jp
Toshihiro Hiraoka 0.68 gpx2shp(1)