ARCHIVED: At IU, using Pine, how do I convert a class roster I receive via email to a list of email addresses?
Note: In June 2006, UITS retired the IUIS mainframe from service. All IUIS accounts were disabled on April 1, 2006. All applications previously located in the mainframe environment have been moved to new Unix or Windows platforms. If you have specific questions regarding the retirement of IUIS, contact your University Information Systems application development team manager.
At Indiana University, you can view and download electronic rosters for classes you're teaching (including student email addresses) using Oncourse:
- ARCHIVED: In Oncourse, how can I view my class roster?
- ARCHIVED: In Oncourse, how can I export a class roster?
Alternatively, if you have an IUIS account, you can use the IUIS system to request a roster of students. However, you must then follow the instructions below to create a properly formatted listing for your distribution list.
To convert a class roster you received from IUIS via email into a list of email addresses, using Pine on a Unix system (e.g., Steel), follow these steps:
Note: For explanations of the special Emacs keystroke notation, see the Knowledge Base document In Emacs, how are keystrokes denoted?
- Extract the roster from the email message to a file on your
account. To do this with Pine, while viewing the message, or from the
index screen with the message selected, press
e. Pine will present a prompt: EXPORT: (copy message) to file in home directory: - Enter a filename for the message.
- To exit to the Unix shell, in Pine, from the Main Menu, press
Ctrl-z.
- Enter:
emacs filename
Replace
filenamewith the name you chose. This loads Emacs and opens your roster file for editing.
- Edit out all email message headers so that the top line of the
buffer begins with the first name in the roster. If you
need help with editing in Emacs, please see the Knowledge Base
document In Emacs, how can I learn about basic editing?
- With your cursor on the first character of the first line of the
buffer, press
C-SPCto set a mark at this point.
- Move the cursor to the end of the buffer by pressing
M->.
- With the cursor at the end of the roster, move your cursor so it
is over the first letter of the username field. For example, if the
last line of the roster looks something like the following, your
cursor should be on the letter that is in bold type (the
JinJANEDOE): 197,BL,0000,000000000,DOE, JANE MARY ,JANEDOE ,INDIANA.EDU - To eliminate all of the data to the left of the usernames, enter: M-x delete-rectangle
- Move the cursor back to the top of the buffer by pressing
M-<.
- All that should remain of the list now are the usernames (e.g.,
JANEDOE) and the domains (e.g.,INDIANA.EDU). To combine these into proper email addresses, you must convert the delimiting commas into@signs. To do this, start a query-replace function by pressingM-%(the percent sign).
- At the
Query replace:prompt, press the,(comma) key, then pressRET. At thewith:prompt, press@(the at sign), then pressRET. Finally, press!(the exclamation mark) to replace all occurrences at once.
- You need to use the query-replace function again, this time to
remove all of the extra spaces. Press
M-<to move back to the top of the buffer, then pressM-%(the percent sign).
- At the
Query replace:prompt, pressSPC, then pressRET. At thewith:prompt, pressRET. Finally, press!(the exclamation mark) to remove all the spaces. Your file of email addresses should now be formatted correctly.
- To save your file, press
C-x C-s. To exit Emacs, pressC-x C-c.
-
To return to Pine, at the Unix prompt, enter
exit.
With this file, you can create a LISTSERV list, or import it into your email as a distribution list. See the relevant Knowledge Base documents below for information on how to do this.
Last modified on November 01, 2008.







