UW Services

ID #1071

Convert UW Classlist to .htaccess File

There are a few steps to converting your UW class lists, but it is very straight forward.

First go to MyUW and have the list emailed to you in 'tab delimited' format.

Import this list into Excel so it looks like this:

excel_classlist.JPG

One of the fields will contain the UW e-mail addresses of your students. Copy this field to a new Excel spreadsheet. Perform a find and replace on the column containing the email addresses and replace '@u.washington.edu' with nothing. You should now have a single column with the student UW NetID's. Select the UW NetID's and paste them into the Windows notepad text editor. Save the text file and upload to your UNIX account. (Homer)

Once you are logged into homer you will want to go to the UNIX shell prompt by connecting to Homer via secure shell and then pressing 'S' at the UW menu to go to the shell. Then type the following command to transform the list from a column of UW NetID's to a list of ID's separated by spaces:

bash-2.05b$ perl -p -e 's/\\n/ /' < classlist.txt > newlist.txt

In the line above I've converted the original classlist.txt to newlist.txt.

The results would look something like this:

From:

uwnetid1
uwnetid2
uwnetid3

To:

uwnetid1 uwnetid2 uwnetid3

Then all you need to do is paste this into your .htaccess file following the UW instructions at http://www.washington.edu/computing/web/publishing/uwnetid-list.html.

Last update: 2005-09-11 23:12
Author: Joshua Ayson
Revision: 1.0

Print this record Print this record
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 2.5 from 5 (2 Votes )

completely useless 1 2 3 4 5 most valuable