Librenix  
(Show all Shell articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Date Related Shell Functions

Up
vote
Down

Five shell date functions based on the cal[endar] command...
Many shell programs need to compute dates, for example, to retrieve yesterday's backup, to create Oracle table partitions for next week, or to run a job the first Saturday every month. In this article, we present the following date-related functions written in shell:
  • pn_month — Previous and next x months relative to the given month
  • end_month — End of month of the given month
  • pn_day — Previous and next x days of the given day
  • cur_weekday — Day of week for the given day
  • pn_weekday — Previous and next x day of weeks relative to the given day
 read more | mail this link | score:9190 | -Ray, September 7, 2005
More Sysadmin articles...

admin headlines

Removing Pulse Audio from Ubuntu 8.10

Faster web page tips

Set up Apache, Tomcat (mod_jk), SSO (CAS, mod_auth_cas)

Set up a Cisco lab on Linux

Tutorial: SFTP chroot user jail with OpenSSH 5.x

Automate Apache load testing

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search


T-shirt gallery:  I Love Vampires T-shirts
 

Articles are owned by their authors.   © 2000-2010 Ray Yeargin