I am writing some PERL code (and I realize this is a UNIX forum), but was wondering if anyone has a quick routine (PERL or shell scripting) to take a date in YYYYMMDD format and return the 3 digit Julian number.
For instance, my program will have a variable called "$Settlement_Date" and will... (5 Replies)
hi
i need a scrit to convert one date format to another. for example
i have three columns in a file which gets a different format, but lastly i want output
with stadard timestamp as "yyyy-mm-dd hh:mm:ss"
column1 column2 ... (2 Replies)
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)
I need to be able to identify files with file timestamps greater than a given timestamp.
I am using the following solution, although it appears to compare files at the "seconds" granularity and I need it at the milliseconds. When I tested my solution, it missed files that had timestamps... (3 Replies)
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)
Hello ,
I am working on AIX. I have to convert Unix timestamp to normal timestamp. Below is the file. The Unix timestamp will always be preceded by
EFFECTIVE_TIME as first field as shown and there could be multiple EFFECTIVE_TIME in the file : 3.txt
Contents of... (6 Replies)
I have a string time=20170303201234
I want to split it and put a dot
result:
20170303.201234
CODE:
ttdotss=`echo ${time} | {8}.{8}`
Doesn't understand
I tried this:
CODE:
ttdotss=`echo ${time} |cut -c 1-8 | . | cut -c 9-14`
Result:
script: .: argument expected... (4 Replies)
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 PHP
collator_sort_with_sort_keys
COLLATOR_SORT_WITH_SORT_KEYS(3) 1 COLLATOR_SORT_WITH_SORT_KEYS(3)Collator::sortWithSortKeys - Sort array using specified collator and sort keys
Object oriented style
SYNOPSIS
public bool Collator::sortWithSortKeys (array &$arr)
DESCRIPTION
Procedural style
bool collator_sort_with_sort_keys (Collator $coll, array &$arr)
Similar to collator_sort(3) but uses ICU sorting keys produced by ucol_getSortKey() to gain more speed on large arrays.
PARAMETERS
o $coll
-Collator object.
o $arr
-Array of strings to sort
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
collator_sort_with_sort_keys(3) example
<?php
$arr = array( 'Kopfe', 'Kypper', 'Kopfe' );
$coll = collator_create( 'sv' );
collator_sort_with_sort_keys( $coll, $arr );
var_export( $arr );
?>
The above example will output:
array (
0 => 'Kopfe',
1 => 'Kypper',
2 => 'Kopfe',
)
SEE ALSO
Collator constants, collator_sort(3), collator_asort(3).
PHP Documentation Group COLLATOR_SORT_WITH_SORT_KEYS(3)