how to change time hr:mm to mm:hr in perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to change time hr:mm to mm:hr in perl
# 1  
Old 12-25-2009
how to change time hr:mm to mm:hr in perl

Hi

I want to match time hr:mm and change to mm:hr
please let me know how to do that in perl
# 2  
Old 12-25-2009
Quote:
Originally Posted by lakshmikant
...
I want to match time hr:mm and change to mm:hr
...
Do you wish to validate it as well ?

tyler_durden
# 3  
Old 12-26-2009
Hello ,
what do you exactly mean by "match" ?
Try this,
Code:
perl -wln -e '@_=split(/:/);print $_[1].":".$_[0];'

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

change time

Hi all, I want change the time settings from EST to IST by using command line in Debian os. but it is not taken. Can any body show me the how to change the time settings by using command line. Thanks, (1 Reply)
Discussion started by: mastansaheb
1 Replies

2. AIX

AIX TIME CHANGE

Hi Guys , I see a weird problem with one of the AIX Machine, The time is changing randomly on the server. The seconds part of the time is what is the problem which is jumping on a uneven order and coming back to the original state after some time and again the same.. I have collected the time... (8 Replies)
Discussion started by: kkeng808
8 Replies

3. Shell Programming and Scripting

Perl :How to print the o/p of a Perl script on console and redirecting same in log file @ same time.

How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ? Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies

4. Solaris

change time

The time of our Solaris server now is slowly more 20 seconds. How can we change it ? (3 Replies)
Discussion started by: anhtt
3 Replies

5. UNIX for Dummies Questions & Answers

Change the time in AIX

I have already updated the DST change but my system time is about 10 minutes off. How do i set the time in the AIX 5.3? Thanks Dave (1 Reply)
Discussion started by: rocker40
1 Replies

6. Linux

How To change time?

what command must i use to change time ? (4 Replies)
Discussion started by: Sirius
4 Replies

7. UNIX for Dummies Questions & Answers

How to change time as root?

Hi, Can someone tell me how to change time inside red hat linux machine as root? ThanX! (1 Reply)
Discussion started by: whatisthis
1 Replies

8. UNIX Desktop Questions & Answers

Change time source?

I need to change the time on my SUN box, it is five minutes fast. (4 Replies)
Discussion started by: michelemcdonald
4 Replies

9. UNIX for Dummies Questions & Answers

Time change not working...

Hi, I am pretty new to the Solaris world. Just installed the version 8 and found that the time is off. I am in the Central time zone. In the beginning, the date and time was off by a day. After changing the /etc/default/init, there is no avail. The date is now correct but the time is still 5 hours... (7 Replies)
Discussion started by: conflansun
7 Replies

10. UNIX for Dummies Questions & Answers

How do I change the time in Unix?

Hi there. This is probably a very stupid question, but... How do I change or set the time in UNIX? I am taking care of a Sun Ultra 5 running SunOS 5.7 and I can't figure out how to change the time. Help. (3 Replies)
Discussion started by: Tannim
3 Replies
Login or Register to Ask a Question