Who do I convert "noon oct 21" to a date time linux and compare it with current date time?
-
I need to write a shell script that will take the date time from arg and when that date and time is reached, the shell needs to do something. The date time in the arg is in this ...show more
-
Answer:
The date(1) command may have a parameter to interpret this free format description. For example: date --date "noon oct 21" If so, you can use the format string (+ then % letter - one is seconds since 1970) to output the date as an absolute number of seconds. That can be compared with the current date/time. But personally I'd be looking at converting this free format into a format that at(1) can understand and let your server handle the scheduling automatically.
FHMUFEJC6GXFHNSEFYQNWFHKO4 at Yahoo! Answers Visit the source
Related Q & A:
- How to store global date time and convert it to local date time?Best solution by Stack Overflow
- How can I send an http request at a specific time?Best solution by Stack Overflow
- How to convert full date/time to timestamp?Best solution by Stack Overflow
- How can I convert a string number to a number in Perl?Best solution by Stack Overflow
- What is the Best way to request for part time as a current full time employee?Best solution by everydaylife.globalpost.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.