What Operating System and version are you running?
What Shell are you using?
Do you have a High Level Programming Language available?
Do you have use of "perl", "awk" or other quick programming tools?
Further to Jim Mcnamara, what is the "some command" ? Is it something which can be changed to produce a date in a more usable format - preferably including the year too? Is it written in a language which could be used to convert the date? Is the date output from "some command" created on that very day (in which case the process could perhaps output a timestamp file)?
If the date format cannot be changed what is the precise format for a single digit day (leading zero?, month two spaces day?, month space day?).
To answer one of you questions in mainstream "find" the effect of "-older" is achieved by negating "-newer". If your date actually comes from "ls" command we could of course refer to the file itself not a directory listing of the file.
Example of one way to convert character month to numeric month:
This script is an example which also tests itself for every possible month name. There are other more clever Shell techniques available which are less portable.
Hello,
I want to convert MM DD YYYY date format to MM-DD-YYYY format.
For exemple:
I have to convert Nov 28 2005 to 28-11-2005.
Thenks for youf help.
DAFI (2 Replies)
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh
count=`db2 -x "select count(*) from schema.tablename"`
echo "count"
I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Hi all,
I require to convert julian date to normal calander date in unix
for eg julian date=122
now i want corresponding calander date
----------------------------------------
gr8 if give very small command/script
and please explain the steps as well(imp)
Thanks
... (3 Replies)
In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line.
I thought I would... (4 Replies)
Hi,
I would like to change the incoming date format (Jun 25 2010) to 06/25/2010. I have seen date "dconv" function but i am not sure how that works.
$ echo "Jun 25 2010" |
nawk ' { months=" JanFebMarAprMayJunJulAugSepOctNovDec";date=$1;month=index(months,substr($1,1,3))/3;
... (3 Replies)
Hi
I want to convert date from one format to the other i.e.
From
Thu Mar 6 15:57:39 2014
To
2014-03-06 15:57:39
Is there any direct command to implement this ? (1 Reply)
hi all,
How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt
how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)