Skip to content

Instantly share code, notes, and snippets.

Created Jul 13, 2013
What would you like to do?
A small bash function to consistently name 'paperless' documents.
# A consistent title for 'paperless' documents.
# Usage:
# $ title Apple ipod Receipt
# $ [2013-07-08 => apple ipod receipt] copied to clipboard.
# Then paste directly into Evernote, etc.
function title {
title_str=`date '+%Y-%m-%d'`
title_str="$title_str =>"
while [ $1 ]
lower=`echo $1 | awk '{print tolower($0)}'` # Lower() the string, purely for consistency.
title_str="$title_str $lower"
title_str="$title_str (Paperless)"
echo $title_str | pbcopy
echo "[$title_str] copied to clipboard."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment