Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


"XX XX seconds hours" into "seconds" of the problem

Day is a time domain to the following format documents which are necessary for their combined
[code]31 Seconds
One minute and 47 seconds
20 seconds
13 minutes 58 seconds
12 seconds
13 seconds
8 seconds
20 seconds
6 seconds
21 seconds
7 seconds
16 seconds
38 seconds
12 seconds
32 seconds
14 seconds
54 seconds
1 minute 39 seconds
5 minutes eight seconds
23 seconds
13 seconds
[/code] Requirements for the output file format
[code]31 Seconds and 31 seconds
107 seconds, one minute and 47 seconds
20 seconds to 20 seconds
13 minutes 58 seconds, 838 seconds
12 seconds and 12 seconds
13 seconds, 13 seconds
8 seconds, eight seconds
20 seconds to 20 seconds
6 seconds, 06 seconds
21 seconds 21 seconds
7 seconds, seven seconds
16 seconds, 16 seconds
38 seconds, 38 seconds
12 seconds and 12 seconds
32 seconds, 32 seconds
14 seconds and 14 seconds
54 seconds, 54 seconds
1 minute 39 seconds 99 seconds
5 minutes 8 seconds, 308 seconds
23 seconds, 23 seconds
13 seconds, 13 seconds
-------------------------------
Total 1692 28 minutes 12 seconds seconds [/code]
Trouble you sell (not about the format, can be given a key code), Thank you!

"XX XX seconds hours" into "seconds" of the problem

[code]
Sed 'depends strongly hours /\*60+/;s/ seconds 4003rd' xx|bc>xxx
Property xx xxx|awk '{a+=$NF;print $ 0 "seconds" }END{printf ( "----\n together %d hours %d seconds \t%d seconds \n" a/60, a%60, a))'


[/code]
Results
[code]
31 seconds and 31 seconds
107 seconds, one minute and 47 seconds
20 seconds to 20 seconds
13 minutes 58 seconds, 838 seconds
12 seconds and 12 seconds
13 seconds, 13 seconds
8 seconds, eight seconds
20 seconds to 20 seconds
6 seconds, 06 seconds
21 seconds 21 seconds
7 seconds, seven seconds
16 seconds, 16 seconds
38 seconds, 38 seconds
12 seconds and 12 seconds
32 seconds, 32 seconds
14 seconds and 14 seconds
54 seconds, 54 seconds
1 minute 39 seconds 99 seconds
5 minutes 8 seconds, 308 seconds
23 seconds, 23 seconds
13 seconds, 13 seconds
----
Total 1692 seconds and 28 minutes 12 seconds

[/code]

"XX XX seconds hours" into "seconds" of the problem

"XX XX seconds hours" into "seconds" of the problem

"XX XX seconds hours" into "seconds" of the problem

To li2002
Bc mistakes in the whole block (the data provided is incomplete! ), Had been revised as follows :
[code]cat Xx|sed 'depends strongly hours /*60+/;s/ seconds /+0/' |sed 's/\+$/+0/' |bc "xxx[/code]
Completed, thanks again [color=red]li2002[/color]!

"XX XX seconds hours" into "seconds" of the problem

Your "seconds" after the words have things right.
Cat xx|sed it 'depends strongly hours /*60+/;s/ seconds. *// '

"XX XX seconds hours" into "seconds" of the problem

-->
No Eastern seconds behind, but as "12 seconds" enough "points" of the figures will become a single figure to 36.2% after being given, "seconds" with the "flight"

"XX XX seconds hours" into "seconds" of the problem

I test how your text not being given?

Echo 31|bc

31
No problem ah



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com