Created
July 13, 2013 14:55
-
-
Save dliggat/5990988 to your computer and use it in GitHub Desktop.
A small bash function to consistently name 'paperless' documents.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 ] | |
do | |
lower=`echo $1 | awk '{print tolower($0)}'` # Lower() the string, purely for consistency. | |
title_str="$title_str $lower" | |
shift | |
done | |
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