Skip to content

Instantly share code, notes, and snippets.

@kmcd
Created March 27, 2009 15:18
Show Gist options
  • Save kmcd/86736 to your computer and use it in GitHub Desktop.
Save kmcd/86736 to your computer and use it in GitHub Desktop.
# Timesheet logging
# Just install ts (from moreutils) & add to your ~/.bash_profile or ~/.bashrc,
# Usage:
# $ tsl 'setting up staging server'.
# NB message must be enclosed in quotes to include shell chars (>, >>, | and friends)
# $ tsl
# Mar 27 11:29:49 'setting up staging server'
tsl() {
if [ -z "$1" ]
then
cat ~/.timesheet ;
else
echo "$*" | ts >> ~/.timesheet ;
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment