#!/bin/csh
# format the pips.sources file into a readable display

set SOURCES = "/var/ti/admin/pips.sources"
set SORTED  = "/tmp/sources.sorted"

# sort the file
rm $SORTED
sort $SOURCES > $SORTED

# print the heading

echo "                 Providers of Documents in TechInfo"
echo ""
echo "This document lists a phone number and person to contact if you have questions"
echo "regarding documents in TechInfo.  To obtain the source of individual documents,"
echo "do one of the following."
echo ""
echo "  Standard application (from dialup, Athena, telnet)"
echo "    Open a document or a selected menu item about which you wish to find"
echo "    information."
echo ""
echo "    On the command line, enter source"
echo "    The information appears at the top of the window."
echo ""
echo "  Macintosh, DOS Windows and X Window's based versions,"
echo "      Open a document or select the menu item about which you wish to find"
echo "      information."
echo ""
echo "      Under the File menu, click on the Get Info." 
echo "      A box appears with the appropriate information."
echo ""
echo "  CMS application"
echo "      Press PF5 when viewing a document or a menu.  Remember, the document" 
echo "      or menu must be open in order to get source information."


echo ""
echo "Source      Organization"                       
echo "----------------------------------------------------------------------------"

# print file in a fancy format

awk -F: '{printf "%-12s%-45s\n%13c%-22s%-14.12s%-25s\n\n", $1, $2, " ", $3, $4, $5}' $SORTED

# cleanup
rm $SORTED


