Mon, 19 Nov 2007, by [EMAIL PROTECTED]: > For all you scripting gurus out there. Can you help me out? > > I'm trying to convert a value to an output to the user of > minutes:seconds. > > For example: > if $A=100 (for seconds) > Then echo "This is 1:40 minutes" > > How would I do this?
$ A=100 $ python -c 'import time,sys; \ print "This is %d:%d minutes" % \ (time.localtime(float(sys.argv[2]))[4:6])' - $A This is 1:40 minutes Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 10.2 + Jabber: [EMAIL PROTECTED] Kernel 2.6.20 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
