UnixWorld ``New To Unix'' Column: October 1988: Listings Listing 1. Electronic mail is an important UNIX system service A. Use the UNIX mail command to read your mail: log-in sequence You have mail $ mail >From dab Mon Oct 12 18:06 MDT 1988 Don't forget to write the intro for the C language training brochure. I need it by tomorrow morning if I'm to get the material to the printer in time. Thanks Doris ? d $ [] B. If you don't remember what to do while using the mail program, type a question mark to display an on-line help message that summarizes mail commands. Here's a typical display: q quit x exit without changing mail p print s [file] save (default mbox) w [file] same without header - print previous d delete + next (no delete) m (user) mail to user ! cmd execute cmd C. To send mail to another user, type "mail" with the use's log-in name as an argument. Type the text of the message followed by a dot (.) or Control-D on a line by itself. $ mail dab Thanks for the reminder, Doris. I just sent the intro in a separate mailing. If you have any problems with it, let me know. Bye, Augie . $ [] D. The mail program commands allows you to address mail to more than one user and to take text from a file via redirection: $ mail dab viv ddc < new_procs $ [] Listing 2: An example (fictional) UUCP-network A. System interconnections among a group of Unix systems are obtained via direct and dial-up UUCP connections. +--------+ +-------+ +-------+ +-------+ | site1 |--| site2 |--| backa |--| site3 |-- jones +--------+ +-------+ +-------+ +-------+ | | mary +-------+ +-------+ | backb |--| site4 |-- sparks +-------+ +-------+ | candy B. Here are some sample mail paths between users on this network: mary to jones: site2!backa!site3!jones mary to sparks: site2!backb!site4!sparks candy to mary: backa!site2!site!mary C. Equivalent Internet-style addressing. (Note: we need to convert each machine host name to a valid Internet domain name by tacking on a valid domain. Here we use ``.com'' for simplicity.) mary to jones: jones@site3.com mary to sparks: sparks@site4.com candy to mary: mary@site.com ---------------------------------------------------------------------------- Copyright © 1995 The McGraw-Hill Companies, Inc. All Rights Reserved. Edited by Becca Thomas / Online Editor / UnixWorld Online / editor@unixworld.com [Go to Contents] [Search Editorial] Text entry and HTML markup by Arlene Lee Last Modified: Thursday, 04-Apr-96 12:16:57 PST