#!/bin/dash if [ "$1" = "date" ]; then echo "$(date '+%a. %Y-%m-%d')" elif [ "$1" = "time" ]; then echo "$(date '+%H:%M %Z')" else echo "$(date '+%a. %Y-%m-%d | %H:%M %Z')" fi