#! /bin/sh # timestamp (Bourne shell script) -- prints the date and time, separated by a space # Usage: timestamp [ -u ] # Where -u causes UTC to be used instead ("Z" is printed after the time) if [ "x$1" = x-u ] ; then shift date "$@" -u '+%Y-%m-%d %H:%MZ' else date "$@" '+%Y-%m-%d %H:%M' fi