home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / drdobbs / 1987 / 06 / bbs.l8 < prev    next >
Text File  |  1987-05-05  |  2KB  |  86 lines

  1. Listing Eight
  2.  
  3. .profile For the info Account
  4.  
  5.  
  6.  
  7.     # set the default path to an empty rbin directory
  8.  
  9. 1    PATH=/u/bbs/info/rbin
  10.  
  11.     # set the level one prompt to the logoff message
  12.  
  13. 2    PS1='Type CNTRL-D now...'
  14.  
  15.     # display the welcome message
  16.  
  17. 3    echo
  18. 4    echo "              Welcome to Scholastech Telecommunications"
  19. 5    echo "                             Scholastech Info"
  20. 6    echo
  21. 7    cat msg
  22. 8    echo
  23. 9    echo "Press the carriage return to begin: \c"
  24. 10    read dummy
  25.     
  26.     # display the contents of the information file
  27.  
  28. 11    more info.file
  29. 12    echo
  30. 13    echo "Press the carriage return when done: \c"
  31. 14    read dummy
  32. 15    echo
  33.  
  34.     # give the user the choice of whether or not to sign up for workshops
  35.  
  36. 16    echo "Do you wish to sign up for a workshop? (Y/N) \c"
  37. 17    read dummy
  38.  
  39.     # loop until user doesn't want to register for any more workshops
  40.  
  41. 18    while [ "$dummy" = y -o "$dummy" = Y ]
  42. 19    do
  43. 20        echo
  44. 21        echo "Enter your name: \c"
  45. 22        read regname
  46. 23        echo
  47. 24        echo "For which workshop are you registering? \c"
  48. 25        read workshop
  49. 26        echo
  50. 27        echo
  51. 28        echo "Enter your school or company name: \c"
  52. 29        read school
  53. 30        echo
  54. 31        echo "For how many people are you registering? \c"
  55. 32        read people
  56. 33        echo
  57. 34        echo "Enter a voice phone number where you can be reached in case"
  58. 35        echo "there are any questions about your registration: \c"
  59. 36        read phone
  60. 37        echo
  61.  
  62.     # write the registration data to disk
  63.  
  64. 38        echo $regname >>signups
  65. 39        echo $workshop >>signups
  66. 40        echo $school >>signups
  67. 41        echo $people >>signups
  68. 42        echo $phone >>signups
  69. 43        echo >>signups
  70.  
  71.     # allow the user to register for more than one workshop
  72.  
  73. 44        echo "Do you wish to register for another workshop? (Y/N) \c"
  74. 45        read dummy
  75. 46    done
  76.  
  77.     # tell the user how to log off
  78.  
  79. 47    echo
  80. 48    echo "Type CNTRL-D to log off the system."
  81. 49    echo    
  82.  
  83.  
  84.  
  85.  
  86.