Thread View: news.software.nn
1 messages
1 total messages
Started by Scott Hannahs
Wed, 21 Aug 1991 14:24
Mail alias expander
Author: Scott Hannahs
Date: Wed, 21 Aug 1991 14:24
Date: Wed, 21 Aug 1991 14:24
39 lines
2184 bytes
2184 bytes
The man page for nn states that " Notice: currently there are no alias
expanders delivered with nn." And since a inherently poor memory on my
part makes it tough to remember an actual address, I hacked together the
following script to look up aliases in my .mailrc file and substitute
the actual address for the alias.
Put the following script somewhere reasonable (perhaps
/usr/local/lib/nn) and set execute permission. Set the init file so
that the variable nn is set to this program. Enjoy.
-------------------------- Cut Here ---------------------------------------
#!/bin/sh
# mail-alias, expands aliases from your .mailrc file for nn
# Written by Scott Hannahs, Bitter National Magnet Lab, MIT, August 1991
# Complaints, comments, ideas to sth@slipknot.mit.edu
# tested on Silicon Graphics, IRIX 3.3.1
TMP_DIR=/usr/tmp
ADDRESS_LIST=""
ALIAS_LIST=`head -1 $1 | sed -e s/To://`
for ALIAS in $ALIAS_LIST ; do
ADDRESS=`grep '^[ ]*alias[ ]'"$ALIAS"'[ ]' ${HOME}/.mailrc |\
sed -e s/'^[ ]*alias[ ]'"$ALIAS"'[ ]'//`
if [ "$ADDRESS" ] ; then
ADDRESS_LIST="$ADDRESS_LIST $ADDRESS"
else
ADDRESS_LIST="$ADDRESS_LIST $ALIAS"
fi
done
echo "To:${ADDRESS_LIST}" > ${TMP_DIR}/nn.alias.$$
tail +2 $1 >> ${TMP_DIR}/nn.alias.$$
mv -f ${TMP_DIR}/nn.alias.$$ $1
----------------------------- Cut Here -------------------------------------
random lines for the line eater
a
r
g
h
h
h
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads