aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_mailx-alias
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2021-12-13 17:23:42 -0500
committerRyan Kavanagh <rak@rak.ac>2021-12-13 17:23:42 -0500
commite1096db47d332f2e4bfb4f38d262bb94e69d9ad5 (patch)
tree1b26b1fedacd307a115cb3a963c8cc8a60a18e96 /bin/executable_mailx-alias
parenttypo (diff)
set exec and stuff
Diffstat (limited to 'bin/executable_mailx-alias')
-rwxr-xr-xbin/executable_mailx-alias13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/executable_mailx-alias b/bin/executable_mailx-alias
new file mode 100755
index 0000000..c1d961a
--- /dev/null
+++ b/bin/executable_mailx-alias
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+MUTT_ALIAS=${HOME}/.mutt/alias.rc
+MAILX_ALIAS=${HOME}/.mailx-aliases.rc
+
+awk '{
+ NAME="";
+ for (i = 3; i < NF; i++) {
+ NAME=NAME " " $i;
+ };
+ NAME = substr(NAME, 2);
+ print "alias", $2, "\"" $NF, "(" NAME ")\"";
+}' $MUTT_ALIAS > $MAILX_ALIAS