05-25-2012
Although this latter approach is not a conversion but an approximation and it will show (big) conversion errors around date changes..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: DrivesMeCrazy
5 Replies
2. Shell Programming and Scripting
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)
Discussion started by: jbsimon000
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: figaro
3 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: dinesh1985
1 Replies
5. UNIX for Advanced & Expert Users
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)
Discussion started by: peckenson
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: ida1215
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: danowar
3 Replies
8. Shell Programming and Scripting
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)
Discussion started by: Optimus81
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: r_t_1601
5 Replies
10. Shell Programming and Scripting
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
ICONVCTL(3) Linux Programmer's Manual ICONVCTL(3)
NAME
iconvctl - control iconv behavior
SYNOPSIS
#include <iconv.h>
int iconvctl (iconv_t cd , int request, void * argument);
DESCRIPTION
The argument cd must be a conversion descriptor created using the function iconv_open.
iconvctl queries or adjusts the behavior of the iconv function, when invoked with the specified conversion descriptor, depending on the
request value.
REQUEST VALUES
The following are permissible values for the request parameter.
ICONV_TRIVIALP
argument should be an int * which will receive 1 if the conversion is trivial, or 0 otherwise.
ICONV_GET_TRANSLITERATE
argument should be an int * which will receive 1 if transliteration is enabled in the conversion, or 0 otherwise.
ICONV_SET_TRANSLITERATE
argument should be a const int *, pointing to an int value. A non-zero value is used to enable transliteration in the conversion. A
zero value disables it.
ICONV_GET_DISCARD_ILSEQ
argument should be an int * which will receive 1 if "illegal sequence discard and continue" is enabled in the conversion, or 0 oth-
erwise.
ICONV_SET_DISCARD_ILSEQ
argument should be a const int *, pointing to an int value. A non-zero value is used to enable "illegal sequence discard and con-
tinue" in the conversion. A zero value disables it.
RETURN VALUE
The iconvctl function returns 0 if it succeeds. In case of error, it sets errno and returns -1.
ERRORS
The following errors can occur, among others:
EINVAL The request is invalid.
CONFORMING TO
This function is implemented only in GNU libiconv and not in other iconv implementations. It is not backed by a standard. You can test for
its presence through (_LIBICONV_VERSION >= 0x0108).
SEE ALSO
iconv_open(3), iconv(3)
GNU
February 2, 2004 ICONVCTL(3)