#!/usr/bin/env bash LOGFILE=/var/log/$1.log MSG=`cat` echo "$(date): $MSG" >> $LOGFILE