Sponsored Content
Top Forums Shell Programming and Scripting Extracting date & time from file name Post 302463718 by milink on Monday 18th of October 2010 09:27:24 AM
Old 10-18-2010
Hi,

Your help is highly appreciated. Thanks for the same.

One more query...regarding sort the files in descending order having name as below:

exp_bkp_tables_18_Oct_2010_10_50_28.dmp
exp_bkp_tables_18_Oct_2010_10_57_00.dmp
exp_bkp_tables_17_Oct_2010_10_58_00.dmp
exp_bkp_tables_17_Oct_2010_10_59_00.dmp

want to display the list of ten latest export copy in descending order

How it can be done ?

With Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Time & Date Command

Hey all, When you run the 'ls -la' command it'll show you the time and dates of all files/directories. Now what I am trying to do is create a script that will tell me what files haven't been used in over the past 1 month and what the time and date is that the files that haven't been accessed in... (2 Replies)
Discussion started by: merlin
2 Replies

2. UNIX for Dummies Questions & Answers

file creation date & time

Hi All, I have some files which are creates every day using a script. I want to create a log files which does write "filename,creation day and time" how can I do this ?? Alice (3 Replies)
Discussion started by: alisevA3
3 Replies

3. UNIX for Dummies Questions & Answers

Backup Date & Time

:confused: I'm not really sure about the default backup date & time in our Unix system and I would like to change it to a convienient time...how do I do that? Please help? (1 Reply)
Discussion started by: EbeyeJJ
1 Replies

4. Shell Programming and Scripting

Help needed - Replacing all date & time occurrences in a file with a string using Sed

Hi, I am new to using Sed. I have a file containg lines like the following: INFORM----Test.pc:168:10/11/05 12:34:26 > some text goes here.. TRACE-----Test.pc:197:10/11/05 12:34:26 > some text goes here.. My requirement is to replace 10/11/05 12:34:26 with a string <RUNDATE> (including <... (4 Replies)
Discussion started by: Hema_M
4 Replies

5. UNIX for Dummies Questions & Answers

Inserting Date&Time Stamp In Existing Log File

I am trying to insert a line with a date stamp in a file that is used to monitor activity in one of our directories. By doing this, I want to grep that file each day and go to the last entry for each time a error occurred and pull all errors generated if any exist. If error exists I want that error... (3 Replies)
Discussion started by: shephardfamily
3 Replies

6. Shell Programming and Scripting

Extracting date-time from file.

I have the following file and need to extract date and time part for each record. Pl. could anyone provide an shell script which could be used to do it. Here is the file: /rgrdev/pdsud2/unx/agc/src/agcmst: /rgrsrc/pdspms/unx/agc/src/s.agcmst.for agcmst.for 420.20 8/4/07 18:30:53 ... (7 Replies)
Discussion started by: skumar11
7 Replies

7. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

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

8. Shell Programming and Scripting

About date & time difference

Hello All, I was having a look on threads on the Forum about time calculation but didn't find exactly this issue. For instance, if we have these 2 dates, begin & end : 20100430235830 20100501000200 Is there anyway, awk, ksh, perl to calculate the difference in sec and get for... (6 Replies)
Discussion started by: rany1
6 Replies

9. Programming

DATE & TIme

Can we select the datetime from oracle database in “hhmmssnnnccyymmdd” format ? please help to solve this..... (2 Replies)
Discussion started by: Sanal
2 Replies

10. Shell Programming and Scripting

Extracting log files based on date and time.

Hi All, i have some log files generated in a folder daily with the format abc.def.20130306.100001 ghi.jkl.20130306.100203 abc.def.20130305.100001 ghi.jkl.20130305.100203 the format is the date followed by time . all i want is to get the files that are generated for todays... (3 Replies)
Discussion started by: mahesh300182
3 Replies
LIBMP(3)						   BSD Library Functions Manual 						  LIBMP(3)

NAME
libmp -- traditional BSD multiple precision integer arithmetic library SYNOPSIS
#include <mp.h> Function prototypes are given in the main body of the text. Applications using this interface must be linked with -lmp (this library) and -lcrypto (crypto(3)). DESCRIPTION
This interface is obsolete in favor of the crypto(3) BIGNUM library. libmp is the traditional BSD multiple precision integer arithmetic library. It has a number of problems, and is unsuitable for use in any programs where reliability is a concern. It is provided here for compatibility only. These routines perform arithmetic on integers of arbitrary precision stored using the defined type MINT. Pointers to MINT are initialized using mp_itom() or mp_xtom(), and must be recycled with mp_mfree() when they are no longer needed. Routines which store a result in one of their arguments expect that the latter has also been initialized prior to being passed to it. The following routines are defined and imple- mented: MINT *mp_itom(short n); MINT *mp_xtom(const char *s); char *mp_mtox(const MINT *mp); void mp_mfree(MINT *mp); mp_itom() returns an MINT with the value of n. mp_xtom() returns an MINT with the value of s, which is treated to be in hexadecimal. The return values from mp_itom() and mp_xtom() must be released with mp_mfree() when they are no longer needed. mp_mtox() returns a null-terminated hexadecimal string having the value of mp; its return value must be released with free() (free(3)) when it is no longer needed. void mp_madd(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_msub(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_mult(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_madd(), mp_msub(), and mp_mult() store the sum, difference, or product, respectively, of mp1 and mp2 in rmp. void mp_mdiv(const MINT *nmp, const MINT *dmp, MINT *qmp, MINT *rmp); void mp_sdiv(const MINT *nmp, short d, MINT *qmp, short *ro); mp_mdiv() computes the quotient and remainder of nmp and dmp and stores the result in qmp and rmp, respectively. mp_sdiv() is similar to mp_mdiv() except the divisor (dmp or d) and remainder (rmp or ro) are ordinary integers. void mp_pow(const MINT *bmp, const MINT *emp, const MINT *mmp, MINT *rmp); void mp_rpow(const MINT *bmp, short e, MINT *rmp); mp_rpow() computes the result of bmp raised to the empth power and reduced modulo mmp; the result is stored in rmp. mp_pow() computes the result of bmp raised to the eth power and stores the result in rmp. void mp_min(MINT *mp); void mp_mout(const MINT *mp); mp_min() reads a line from standard input, tries to interpret it as a decimal number, and if successful, stores the result in mp. mp_mout() prints the value, in decimal, of mp to standard output (without a trailing newline). void mp_gcd(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_gcd() computes the greatest common divisor of mp1 and mp2 and stores the result in rmp. int mp_mcmp(const MINT *mp1, const MINT *mp2); mcmp compares the values of mp1 and mp2 and returns 0 if the two values are equal, a value greater than 0 if mp1 is greater than mp2, and a value less than 0 if mp2 is greater than mp1. void mp_move(const MINT *smp, MINT *tmp); mp_move() copies the value of smp to tmp (both values must be initialized). void mp_msqrt(const MINT *nmp, MINT *xmp, MINT *rmp); mp_msqrt() computes the square root and remainder of nmp and stores them in xmp and rmp, respectively. IMPLEMENTATION NOTES
This version of libmp is implemented in terms of the crypto(3) BIGNUM library. DIAGNOSTICS
Running out of memory or illegal operations result in error messages on standard error and a call to abort(3). SEE ALSO
abort(3), bn(3), crypto(3), free(3), malloc(3), math(3) HISTORY
A libmp library appeared in 4.3BSD. FreeBSD 2.2 shipped with a libmp implemented in terms of libgmp. This implementation appeared in FreeBSD 5.0. BUGS
Errors are reported via output to standard error and abnormal program termination instead of via return values. The application cannot con- trol this behavior. It is not clear whether the string returned by mp_mtox() may be written to by the caller. This implementation allows it, but others may not. Ideally, mp_mtox() would take a pointer to a buffer to fill in. It is not clear whether using the same variable as both source and destination in a single invocation is permitted. Some of the calls in this implementation allow this, while others do not. BSD
September 7, 1989 BSD
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy