From: Nicolas Boisselier Date: Tue, 18 Nov 2014 00:06:57 +0000 (+0000) Subject: Darwin md5sum X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=6196a04f06f11bdee2fc1a3d9cdc751c218a4485;p=nb.git Darwin md5sum --- diff --git a/etc/bashrc.alias b/etc/bashrc.alias index a055c11e..f3296398 100644 --- a/etc/bashrc.alias +++ b/etc/bashrc.alias @@ -21,13 +21,6 @@ alias arp-list="arp -an" # #which etherwake &> /dev/null && alias advent-on="etherwake -i eth0 48:5b:39:eb:db:8a -D -b" -#-------------------------------------------------------------------------------- -# md5sum / md5 -# -case "$OSTYPE" in - darwin*) alias md5sum='md5' ;; -esac - #-------------------------------------------------------------------------------- # seq / jot # diff --git a/etc/bashrc.function b/etc/bashrc.function index d8c260ac..03d96088 100644 --- a/etc/bashrc.function +++ b/etc/bashrc.function @@ -3,7 +3,12 @@ # FUNCTIONS # ################################################################################# + case "$OSTYPE" in darwin*) + md5sum() { + md5 $@ | sed "s/^MD5 (\(.*\)) = \(.*\)$/\2 \1/" + } + mac-xmessage() { osascript -e 'tell app "System Events" to display dialog "'$@'"' }