Created
February 12, 2015 00:38
-
-
Save hivehand/6e5a8b6b4c751e6770c9 to your computer and use it in GitHub Desktop.
Mac-only bash function to push a personalized datestamp into the paste buffer.
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
function pds { | |
local user_name=$(dscl . read /Users/$(whoami) RealName | grep -v RealName | \ | |
cut -c 2- | sed -E 's/ ([^ ])[^ ]*$/ \1/') | |
echo "[$user_name, $(date +%F)]" | pbcopy | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment