Click here to Skip to main content
14,431,049 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello All,

I need to take user input value into the system and convert it to a time format.

as an example :- if user input value as 3, i need to convert this value into 3 hours.

Is this possible in shell scripting.

Thank you,
Posted
Updated 29-Sep-13 2:22am
v2
Comments
Richard MacCutchan 27-Sep-13 13:24pm
   
What is the formula for converting 5 into 3 hours?
ridoy 27-Sep-13 13:46pm
   
totally agree,:))
Zoltán Zörgő 27-Sep-13 14:08pm
   
Try to give a reasonable example.
[no name] 27-Sep-13 14:33pm
   
Yes it is possible. You will have to figure out how you think that 5 translates to 3 hours though, then write a formula for your script.
OriginalGriff 27-Sep-13 14:34pm
   
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
There is no obvious conversion from "5" to "3 hours" so until you explain in rather more detail what you need we can't help you!
Use the "Improve question" widget to edit your question and provide better information.
Strider87 28-Sep-13 1:07am
   
Hello,

Really sorry for disturbing, It's my bad..I need to convert 3 to 3 hours.
Strider87 28-Sep-13 1:07am
   
Hello,

Really sorry for disturbing, It's my bad..I need to convert 3 to 3 hours.
Richard MacCutchan 28-Sep-13 3:07am
   
What do you mean by 'convert'? 3 is already equal to 3. Please use the Improve question link above, and give a proper explanation of what you are trying to achieve.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100