Sponsored Content
Top Forums Shell Programming and Scripting Transpose timestamp based on column values and calculate time difference Post 302715393 by asnandhakumar on Monday 15th of October 2012 12:34:47 AM
Old 10-15-2012
Transpose timestamp based on column values and calculate time difference

Hello Expert,

I need to transpose Date-Timestamp based on same column values and calculate time difference. The input file would be as below and required output is mentioned in the bottom

INPUT File
========
Code:
08/23/2012 12:36:09	JOB_5340
08/23/2012 12:36:14	JOB_5340
08/23/2012 12:36:22	JOB_5350
08/23/2012 12:36:26	JOB_5350

OUTPUT
======
Code:
08/23/2012 12:36:14,08/23/2012 12:36:09,JOB_5340,00:00:05
08/23/2012 12:36:26,08/23/2012 12:36:22,JOB_5350,00:00:04

Many Thanks for your quick response
NK

Last edited by Franklin52; 10-15-2012 at 03:52 AM.. Reason: Please use code tags for data and code samples
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to calculate this time difference

Hi, Please help me in calculating the time difference between below mentioned timestamps. a=07/17/2007 02:20:00 AM MST b=07/17/2007 02:07:46 AM MST Thanks (2 Replies)
Discussion started by: Prat007
2 Replies

2. Shell Programming and Scripting

How to calculate the time difference.

Hi All, I've written a script which reads all the systems backup information and saves it in a log file. ssh -l ora${sid} ${primaryhost} "tail -1 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" | awk '{print $3,$4,$5,$6}' >> ${RESULTFILE} The output comes as below: 2008-09-30 06.00.01... (2 Replies)
Discussion started by: suri.tyson
2 Replies

3. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

4. Shell Programming and Scripting

Calculate difference between two successive values

Hi, I have a file containing timestamps (at micro-seconds granularity). It looks like the following: 06:49:42.383818 06:49:42.390190 06:49:42.392308 06:49:42.392712 06:49:42.393437 06:49:42.393960 06:49:42.402115 Now I need a sed/awk script to take the difference of two successive... (2 Replies)
Discussion started by: sajal.bhatia
2 Replies

5. Shell Programming and Scripting

Calculate age of a file | calculate time difference

Hello, I'm trying to create a shell script (#!/bin/sh) which should tell me the age of a file in minutes... I have a process, which delivers me all 15 minutes a new file and I want to have a monitoring script, which sends me an email, if the present file is older than 20 minutes. To do... (10 Replies)
Discussion started by: worm
10 Replies

6. Shell Programming and Scripting

Transpose field names from column headers to values in one column

Hi All, I'm looking for a script which can transpose field names from column headers to values in one column. for example, the input is: IDa;IDb;IDc;PARAM1;PARAM2;PARAM3; a;b;c;p1val;p2val;p3val; d;e;f;p4val;p5val;p6val; g;h;i;p7val;p8val;p9val; into the output like this: ... (6 Replies)
Discussion started by: popesk
6 Replies

7. Shell Programming and Scripting

Based on the first & last timestamp of the file, need to calculate the time taken to complete

Below is the sample file: 287 DEBUG syndesis.pb.util.ITraceManager - syOID=ELntNetwork:1005Mon Oct 15 17:18:21 IST 2012 <ELClientManagerenEmsSession() > Setting Java Properties 287 DEBUG syndesis.pb.util.ITraceManager - syOID=ELntNetwork:1005Mon Oct 15 17:18:21 IST 2012... (1 Reply)
Discussion started by: ashok.kumar
1 Replies

8. Shell Programming and Scripting

Calculate difference in timestamps based on unique column value

Hi Friends, Require a quick help to write the difference between 2 timestamps based on a unique column value: Input file: 08/23/2012 12:36:09,JOB_5340,08/23/2012 12:36:14,JOB_5340 08/23/2012 12:36:22,JOB_5350,08/23/2012 12:36:26,JOB_5350 08/23/2012 13:08:51,JOB_5360,08/23/2012... (4 Replies)
Discussion started by: asnandhakumar
4 Replies

9. Shell Programming and Scripting

Calculate time difference

I have time in a file in HH:MM:SS format as it contents(its not the file creation time). i need this to be converted to epoch time or time since 1970. The time is written into that file by a script, which i cannot modify. Im using AIX machine $ cat abc.txt 10:29:34 (2 Replies)
Discussion started by: gpk_newbie
2 Replies

10. Shell Programming and Scripting

Transpose from row to column using timestamp in first column

Gents, Transpose from row to column, taking in consideration the first column, which contends the date. Input file 72918,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009,111000009 72918,2356,2357,2358,2359,2360,2361,2362,2363,2364 72918,0,0,0,0,0,0,0,0,0... (12 Replies)
Discussion started by: jiam912
12 Replies
ROTATE(1)						      General Commands Manual							 ROTATE(1)

NAME
rotate - Rotate, mirror, and transpose JPEG images (losslessly whenever possible) SYNOPSIS
rotate { options } file [ file ... ] DESCRIPTION
rotate is a convenience frontend to jpegtran, allowing JPEG images to be rotated, mirrored, or transposed in several ways. These opera- tions are conducted losslessly (i.e., no image recompression) and keep all EXIF metadata intact. OPTIONS
-f, -flip, --flip {horizontal | vertical} horizontal: Mirror image horizontally (left-right). vertical : Mirror image vertically (top-bottom). -r, -rotate, --rotate {90 | 180 | 270} 90 : Rotate image 90 degrees clockwise. 180: Rotate image 180 degrees. 270: Rotate image 270 degrees clockwise (or 90 ccw). -tp, -transpose, --transpose Transpose image (across UL-to-LR axis). -tv, -transverse, --transverse] Transverse transpose (across UR-to-LL axis). SEE ALSO
jpegtran(1) AUTHOR
rotate is distributed as a component of jigl, written by Jason Paul <jigl@xome.net>. Its project page is located at http://xome.net/projects/jigl/. This manual page was adapted from the program help text by Nicholas Breen <nbreen@ofb.net> for the Debian project (but may be used by oth- ers). October 8, 2006 ROTATE(1)
All times are GMT -4. The time now is 01:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy