NeBaut.net
The Corner Shop

Unix time format

#!/bin/bash
#
# Timestamp shell converter

if [[ "$1" == "-c" ]]; then
  date -d '1970-01-01 '$2' sec'
else
  if [[ "$1" == "-g" ]]; then
    date -d "$2" +%s
  else
    echo "Usage:"
    echo " - Convert to normal date format from timestamp format"
    echo ' timestamp.sh -c "<timestamp>"'
    echo " - Generate timestamp date from normal date"
    echo ' timestamp.sh -g "<date>"'
  fi
fi

mas en... http://en.wikipedia.org/wiki/Unix_time

Aule 6:08 PM el 18 de Diciembre 2006 |