10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
So since I'm looking for an easy way to numberize files in a folder according to date:
Is there an easy script (batch, windows), that will rename files like this:
.earliest creation time: 001.file
older creatiin time : 002.file
even older time : 003.file
....
...
..
.
... (10 Replies)
Discussion started by: pasc
10 Replies
2. Shell Programming and Scripting
Hi,
I'm looking for a way to do a simple math calc during a shell script as a means of logging how long a particular task takes.
For example...
STARTTIME=whenever this script starts
./path/to/command.sh >>logfile.log
TOTALTIME=<time at this stage of the script after above command... (7 Replies)
Discussion started by: nbsparks
7 Replies
3. Shell Programming and Scripting
Hi ,
Here is the smaller version of the problem.
Working individually as command
************************>echo $SHELL
/bin/bash
************************>TO_DAY=`date`
************************>echo $TO_DAY
Tue Jul 16 02:28:31 EDT 2013
************************>
Not working when... (5 Replies)
Discussion started by: Anupam_Halder
5 Replies
4. Shell Programming and Scripting
There is a closed Thread: <url>Here will be the url to the original post once I have 5 posts in this forum...</url>
But a small bug had found his way into this very cool and simple code.
#!/bin/bash date2stamp () { date --utc --date "$1" +%s } stamp2date (){ date --utc --date... (2 Replies)
Discussion started by: frood
2 Replies
5. Shell Programming and Scripting
Hi Everyone,
$tmp="20090620231013";
$tmp = substr($tmp,0,8)." ".substr($tmp,8,2).":".substr($tmp,10,2).":".substr($tmp,12,2);
So my output is:
20090620 23:10:13.
I only can think substr is easy, any perl can do this just one line very simple efficient one? :eek:
Thanks (3 Replies)
Discussion started by: jimmy_y
3 Replies
6. Shell Programming and Scripting
Hi all,
i have used the search already before someone shouts at me and i have seen the 'datecalc' program but this is not working correctly for me in the shell and environment i am using.
I am using solaris 10 and bourne shell.
I have two dates '07-04-2009' and '05-05-2009'. I just need to... (2 Replies)
Discussion started by: muay_tb
2 Replies
7. Shell Programming and Scripting
Hi guys,
I have some embedded perl within my shell script to get me the modification time/date of a file which returns me the following string:
Fri May 1 09:52:58 2009
I have managed to get the bits i need such as 1-May-2009, but what i would prefer is 010509 instead...
Here is my... (4 Replies)
Discussion started by: muay_tb
4 Replies
8. UNIX for Dummies Questions & Answers
Hi Guru's,
Are there any simple method to check the date format which is in "YYDDD"
(ex: 08002 for 02-Jan-2008)?
Eventhough this can be implemented in several way's, I need the simpler one. Any idea would be much appreciated.
Thanks in advance,
Mysore Ganapati (4 Replies)
Discussion started by: ganapati
4 Replies
9. HP-UX
Hi all!
I'm working on a HPUX system, and I was wondering if there is a simple way to convert a date from seconds (since 1970) to a normal date.
Thanks (2 Replies)
Discussion started by: travian
2 Replies
10. Tips and Tutorials
The GNU date command in full of goodies but not when it comes to calculate a date or time difference. Here is what I came up with after looking to more than one solution.
Code should be self explaining.
#!/bin/bash
date2stamp () {
date --utc --date "$1" +%s
}
stamp2date (){
... (0 Replies)
Discussion started by: ripat
0 Replies