![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| expiry date for files? | RRVARMA | UNIX for Advanced & Expert Users | 3 | 09-01-2009 10:18 AM |
| Disable the password expiry date | kingganesh04 | SuSE | 1 | 05-13-2009 12:53 AM |
| Find user password expiry date | oztoma | UNIX for Dummies Questions & Answers | 4 | 04-17-2009 10:07 AM |
| Digital Certificate Expiry Date | RG18173 | UNIX for Advanced & Expert Users | 1 | 02-06-2009 03:00 AM |
| domain expiry date | learnbash | Shell Programming and Scripting | 6 | 05-22-2008 03:43 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Expiry date of shell script
Hello folks,
I have question about my expiry of shell script, today date is 2009-11-11, i will have to deploy a script today, how i should setup that my script will not work after 2010-05-11, Between if someone will change the date of server then script will again not work, please give suggestions and recommendation. I need to add this expiry part in shell script. |
|
||||
|
timestamp will help you. If you have gnu date or your date command support %s , can use below code:
Code:
date -d "2010-05-11" +%s 1273500000 |
|
||||
|
Thanks for your kind reply, i have done it.
|
|
||||
|
This does not prevent the script from being run by back dating the system date. You will also need to add a data file that keeps track of the current date and sets a flag when 2010-05-11 occurs so that the script will never run again no matter what the date, or get the current date from a place other than the system that you are running the script on.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|