Calculating the epoch time from standard time using awk and calculating the duration
Hi All,
I have the following time stamp data in 2 columns
.
.
etc
From this data I need the following output.
I tried to convert the second column into seconds using HH*60*60+MM*60+SS+MS(milliseconds) formula and subtracting line by line but the problem is if the date changes at some row, I don't know how to proceed.
May be converting ecah column into epoch time and adding together and subtracting row wise can work,
but i don't know how to do that.
Any help in this regard is highly helpful for me.
Thanks
Sidda
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Hi,
I am having the following problem.
test > hourOfDay=06 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime
180
test > hourOfDay=07 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime
120
test > hourOfDay=08 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime
bash: (9-08: value... (5 Replies)
The date construct in UNIX can be used to calculate when something is finished: date -v+1H displays the time 1 hour from now.
I want to use the same construct in a script, but it is leading to error messages:
echo "Finished at: " `date -v+$durationH`
where $duration is calculated based on input... (3 Replies)
Dear Folks,
I want to calculate the elapsed hours between two time columns. I am using timestampdiff method for the same. I am able to get the value. But facing an issue of decimal values. For example the elapsed hours between 09:00:00 and 20:30:00 is coming as 11 instead of 11.5. I am using below... (1 Reply)
A report needs to come some what similar to this
No of elements Stream Batch No Load time
A B C D
A,B,C im able to get quite easily
wc -l /usr/local/intranet/areas/prod/output/SRGW_0?/*/MESSAGE_T.dat
O/P of above command.
A B C ... (1 Reply)
Hi,
I have a file containing 100,000 rows-by-120 columns and I need to compute for the standard deviation for each row. Any idea on how to calculate row-wise standard deviation using awk? My sample data looks like this:
input data:
23 35 12 25 16 17 18 19 29 12
12 26 15 14 15 23 12 12... (2 Replies)
Hey all. I am working on some scripts in bash to perform a variety of functions; there are a variety of steps involved, and they must happen in a specific sequence; what I need help with is a way to calculate some differences in a timestamp in a logfile.
One of the steps in the scripts I am... (3 Replies)
Hi All,
I have written script and wanted to know the run time of it in seconds. i used below logic but am not getting the results in second instead getting error.
cat pkloader.sh
# if you want to calculate the time in milliseconds then use $(date +%s%N)
START_TIME=`date +%s`
echo... (2 Replies)
Hi All,
I want to run a utility for all the process id that are running for more than 15 mins.
I have captured process id's and the time that they were run in a file like below
1st column represnts the process ids and the 2nd one is the Time
<
21014 01:00
21099 01:00
24361 01:03
24406... (5 Replies)
16:45:51 10051 77845
16:45:51 10051 77845
16:46:52 10051 77846
16:46:53 10051 77846
Match the last PID then subtract second line time with first line.
Please help me with any command or script.
working in media company on a project OS: RHEl7
tried command:
awk 'function... (2 Replies)
Discussion started by: vivekn
2 Replies
LEARN ABOUT DEBIAN
tk::tablematrix::spreadsheethiderows
TableMatrix::SpreadsheetHideRows(3pm) perl/Tk Documentation TableMatrix::SpreadsheetHideRows(3pm)NAME
Tk::TableMatrix::SpreadsheetHideRows - Table Display with selectable hide/un-hide of rows
SYNOPSIS
use Tk;
use Tk::TableMatrix::SpreadsheetHideRows
my $t = $top->Scrolled('SpreadsheetHideRows',
-selectorCol => 3,
-expandData => $hashRef,
-rows => 21, -cols => 11,
-width => 6, -height => 6,
-titlerows => 1, -titlecols => 1,
-variable => $arrayVar,
-selectmode => 'extended',
-resizeborders => 'both',
-titlerows => 1,
-titlecols => 1,
-bg => 'white',
);
DESCRIPTION
Tk::TableMatrix::SpreadsheetHideRows is a Tk::TableMatrix::Spreadsheet-derived widget that implements a Spreadsheet-like display of tabular
information, where some of the rows in the table can be expanded/hidden by clicking a '+/-' selector in the row. This can be used to
display top-level information in a table, while allowing the user to expand certain table rows to view detail-level information.
See demos/SpreadsheetHideRows in the source distribution for a simple example of this widget
Widget-specific Options
In addition the standard Tk::TableMatrix widget options. The following options are implemented:
-selectorCol
Column number where the +/- selector will appear. Clicking on the +/- selector will expand/hide the detail information in the table for a
particular row.
-selectorColWidth
Width of the column used to display the +/- selector. Defaults to 2
-expandData
Hash ref defining the detail-level data displayed when a row is expanded (by clicking the +/- selector). This hash ref should have the
following structure:
$expandData = {
row1 => { tag => 'detailDataTag',
data => $detailData,
spans=> $spanData,
expandData => $subLevelData
},
row2 => {
.
.
}
Where:
row1, row2, ... Row numbers that will be expandable.
tag => 'detailDataTag' Tag name that will be applied to the detail data.
(optional)
$detailData 2D Array of detail-data to be displayed when
the row is expanded.
e.g. [ [ r1c1, r1c2, r1c3 ],
[ r2c1, r2c2, r2,c3] ]
$spans 1D array of span information (optional) to be
used for display of the detail information.
e.g. [ col2 => "rows,cols", col4 => "rows,cols", ... ]
$subLevelData Optional Recursive expandData used to hold detail-data of detail-data.
MEMBER DATA
The following items are stored as member data
defaultCursor
Name of the mouse cursor pointer that is used for normal (i.e. non-title, non-indicator) cells in the widget. This is set to the value of
the $widget->cget(-cursor) option when the widget is created.
indRowCols
Hash ref of Row/Cols indexes where there are indicators stores. This is a quick lookup hash built from _expandData.
_expandData
Internal version of the expandData hash. Any sub-detail data (i.e. expand data that is at lower levels of expandData) that is visible is
placed at the top level of this hash, for keeping track of the visible expandData.
Widget Methods
In addition the standard Tk::TableMatrix widget method. The following methods are implemented:
showDetail
Shows (i.e. expands the table) the detail data for a given row. This method is called when a user clicks on an indicator that is not
already expanded.
Usage:
$widget->showDetail($row);
# Shows the detail data for row number $row
hideDetail
Hides the detail data for a given row. This method is called when a user clicks on an indicator that is already expanded.
Usage:
$widget->hideDetail($row);
# Hides the detail data for row number $row
Tk1.23 2007-01-09 TableMatrix::SpreadsheetHideRows(3pm)