John Bernard Abella [blog]

A System Admin’s Notebook, A Progrmmers Journal

Archive for October, 2009

date function for bash commands

Wednesday, October 28th, 2009

How to get date on bash/sh command?

#!/bin/bash
# Datestamp e.g 2002-09-21_24h00m
DATE=`date +%Y-%m-%d_%Hh%Mm`

# Day of the week e.g. Monday
DATE=`date +%A`

# Day number of the week 1 to 7 where 1 represents Monday
DATE=`date +%u`

# Date of the Month e.g. 27
DATE=`date +%d`

# Month e.g January
DATE=`date +%B`

# Week Number e.g 37
DATE=`date +%V`
Get Adobe Flash playerPlugin by wpburn.com wordpress themes