github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/contrib/gitdm/generate_aliases.sh (about) 1 #!/usr/bin/env bash 2 3 # 4 # This script generates a gitdm compatible email aliases file from a git 5 # formatted .mailmap file. 6 # 7 # Usage: 8 # $> ./generate_aliases <mailmap_file> > aliases 9 # 10 11 cat $1 | \ 12 grep -v '^#' | \ 13 sed 's/^[^<]*<\([^>]*\)>/\1/' | \ 14 grep '<.*>' | sed -e 's/[<>]/ /g' | \ 15 awk '{if ($3 != "") { print $3" "$1 } else {print $2" "$1}}' | \ 16 sort | uniq