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:7852 | -Ray, September 7, 2005
More Sysadmin articles...

Buy Large Wall Art on Canvas

admin headlines

Tutorial: Replace Windows with Ubuntu 13.04

Using mod_spdy with Apache2 on CentOS 6.3

Authenticate OpenVPN with LinOTP

GlusterFS 3.2 Tutorial: Stripe data on 4 Nodes on Ubuntu 12.04

Partimage Tutorial: Create, Restore Partitions

Tutorial: Samba Server with tdbsam on OpenSUSE 12.1

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

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