new file mode 100755
@@ -0,0 +1,45 @@
+#! /bin/sh
+#
+# Generate structured information from MAINTAINERS file
+#
+# Copyright (C) 2018 Free Software Foundation, Inc.
+#
+# This script is Free Software, and it can be copied, distributed and
+# modified as defined in the GNU General Public License. A copy of
+# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+#
+# Run without argument to generate csv file containing names and email addresses.
+#
+# Run with --mutt argument to generate mutt alias file, f.i.
+# $ ./contrib/generate-from-maintainers.sh --mutt >> ~/.muttrc
+
+if [ "$1" = "--mutt" ]; then
+ fmt="
+{
+ alias=name
+ gsub(/ /, \"_\", alias)
+ gsub(/[.]/, \"\", alias)
+ printf \"alias %s %s <%s>\n\", alias, name, email
+}
+"
+else
+ fmt="{ printf \"%s, %s\n\", name, email }"
+fi
+
+grep @ ./MAINTAINERS \
+ | sed 's/[\t][\t]*/\t/g' \
+ | awk -F '\t' \
+ "
+{
+ if (NF == 2) {
+ name=\$1
+ email=\$2
+ } else if (NF == 3 ) {
+ name=\$2
+ email=\$3
+ }
+ gsub(/</,\"\", email)
+ gsub(/>/,\"\", email)
+ $fmt
+}" \
+ | sort -u