Returned mail: Cannot send message for 3 days

Mail Delivery Subsystem MAILER-DAEMON at decwrl.dec.com
Tue Nov 21 06:49:33 AEST 1989


   ----- Transcript of session follows -----
While talking to /usr/bin/mail11v3:
>>> MAIL From:<@sandia.gov:info-unix at brl.mil>
<<< 400 Remote MAIL object at hotair not responding

   ----- Unsent message follows -----
Received: by decwrl.dec.com; id AA04932; Fri, 17 Nov 89 10:05:10 -0800
Message-Id: <8911171805.AA04932 at decwrl.dec.com>
Date: 17 Nov 89 07:42:00 MDT
From: info-unix at BRL.MIL
Subject: INFO-UNIX Digest  V8#119
To: "omalley" <omalley at hotair>

Return-Path: <incoming-info-unix-request at sandia.gov>
Received: from SEM.BRL.MIL by sandia.gov with SMTP ; 
          Fri, 17 Nov 89 05:29:32 MDT
Received: from SEM.BRL.MIL by SEM.brl.MIL id ab04433; 17 Nov 89 3:05 EST
Received: from sem.brl.mil by SEM.BRL.MIL id aa04413; 17 Nov 89 2:47 EST
Date:       Fri, 17 Nov 89 02:47:35 EST
From:       The Moderator (Mike Muuss) <Info-Unix-Request at BRL.MIL>
To:         INFO-UNIX at BRL.MIL
Reply-To:   INFO-UNIX at BRL.MIL
Subject:    INFO-UNIX Digest  V8#119
Message-ID:  <8911170247.aa04413 at SEM.BRL.MIL>

INFO-UNIX Digest          Fri, 17 Nov 1989              V8#119

Today's Topics:
                      Re: files recovery after rm?
                 symbolic link filemodes unchangeable.
               Re: symbolic link filemodes unchangeable.
                             Re: VI & spell
                 Re: Some questions about POSIX headers
                                Re: ESIX
              Re: HOW DO I UNBLOCK A SERIAL LINE ON SUN3?
                        Re: Berkeley Unix on PC?
                           How to choose SCSI
                  Re: export vars from cshell script?
                          Re: a perl question
                   Re: vi editor enhancement request
                            Re: sendmail.cf
                        Re: core files under SV
                    Re: Import variables in to awk.
                        spell..adding new words
                      Re: spell..adding new words
                            ESIX has a bug.
                    Calendar of UNIX-related Events
    -msU troff package sought for vi tutorial (was: vi (vs VMS/EDT))
                   Re: What shell do you use? (Poll)
                  Re: What is a good SCSI controller?
                          Re: another nice one
                                 thanks
            Re: XMODEM transfers while using 'script' (ptys)
                                 patch
                             Re: cc -o *.c
                  MS-DOS BBS programs under 386 UNIXes
                          Need help with lload
                                   tr
                      Prompt as Current Directory?
                    Re: Prompt as Current Directory?
                  Re: termios question, PENDIN option
                     Quiet background proc. in CSH
-----------------------------------------------------------------

From: "Satish Kumar .C" <chittamu at umvlsi.ecs.umass.edu>
Subject: Re: files recovery after rm?
Date: 13 Nov 89 19:07:56 GMT
To:       info-unix at sem.brl.mil

In article <15844 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>Mr. Moore,
 .
 .
 .
>  As has already been pointed out to you, setting your umask to 077
>will cause all files created by you to have permissions ---rw-rw- or
>---rwxrwx.  Meaning that you can't read them or execute them.  I doubt
>that's really what's happening, unless you do very strange things with
>your account.

A minor correction. The low order 9 bits of the umask value are used to
clear the corresponding bits in the mode pattern used to create a file.
So a umask value of 077 would make your file unreadable, unwritable and
unexecutable by either group or others, i.e. your mode will be
-rwx------ or some subset thereof.



-- 
	-Satish.
	chittamu at cs.umass.edu
--
The Theory of Objectivity: E = mc++

-----------------------------

From: Rich Salz <rsalz at bbn.com>
Subject: Re: files recovery after rm?
Date: 13 Nov 89 19:08:30 GMT
Followup-To: poster
To:       info-unix at sem.brl.mil

I believe the "best" solution to this problem is to check out the delete/
undelete programs used at the MIT Project Athena.  Contact your nearest
comp.sources.unix archive site.

It is not a good idea to alias "rm" because you get into bad habits when
you use different systems.
	/r$
-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.

-----------------------------

From: 9704 <bink at aplcen.apl.jhu.edu>
Subject: Re: files recovery after rm?
Date: 17 Nov 89 03:45:07 GMT
To:       info-unix at sem.brl.mil

This was so amusing, I posted it at work.

In article <15844 at bloom-beacon.MIT.EDU> Jonathan Kamens flames:
>   You have a lot of nerve talking pedantically to someone who
> obviously is more informed than you are.
> 
>   You have shown to the net, and to comp.unix.questions in particular,
> ignorance about several relatively basic subjects in the past couple
> of weeks.  That would not be so bad if you were *asking* questions,
> but you are *answering* them, and giving wrong answers in the process.
> 
>   When people do correct you, you have taken the position that you
> must know more than they do, even when you obviously do not.  [...]
> 
> In article <20559 at unix.cis.pitt.edu> yahoo at unix.cis.pitt.edu (Kenneth L Moore)
> writes:
> >You are confusing umask with the actual mask. I set my mask to 111 000 000
> >by using a umask of 077 in my .cshrc. 	[well put]
> 
>   He is confusing nothing.  Mask and umask are identical terms in this
> situation.  Do you even understand why it is *called* a mask?  [...]

See flame above about posting wrong answers to "relatively basic subjects".
 
> 1. Somewhere in the process of creating the file, the open() function [...]

It's *called* creat() (usually), and it's a system call.

> >The first bit in the first word (pertaining to my privileges) is logically
> >anded with 1 giving me read privileges. The second bit is anded with [...]
> 
>   Actually, the whole umask is masked over the requested permissions
> when a file is created using a bitwise AND, not a logical AND.  [...]

*Actually*, there's not a whole heck of a lot of difference when you're
talking about one bit (as Mr. Moore was).  K&R (excuse the bitwise AND)
didn't coin the word "logical".

>   Yes, one which you obviously have gotten wrong.	[oh?]
> 
>   As has already been pointed out to you, setting your umask to 077
> will cause all files created by you to have permissions ---rw-rw- or

Anyone who's ever used umask can see this is wrong.  Contrary to your
followup, if you could show me just *one* place where Mr. Moore was wrong
and you weren't, I'd be surprised.  I think you owe this man an apology.
























					-- Greg Ubben
					   bink at aplcen.apl.jhu.edu
					   ...!uunet!mimsy!aplcen!bink

-----------------------------

From: Paul Reger <paulr at sequent.uucp>
Subject: symbolic link filemodes unchangeable.
Date: 14 Nov 89 17:43:33 GMT
Keywords: ln, links, symbolic
To:       info-unix at sem.brl.mil

Why can't you change the filemodes of a symbolic link ? :

% echo > some_file
% chmod 321 some_file
% ls -l some_file
--wx-w---x  1 paulr           0 Nov 14 09:37 some_file*
% ln -s some_file some_link
% ls -l some_link
lrwxr-xr-x  1 paulr           9 Nov 14 09:38 some_link -> some_file*
% chmod 222 some_link
% ls -l some_file
-rwxrwxrwx  1 paulr           0 Nov 14 09:37 some_file*
% umask 000
% rm some_link
% ln -s some_file some_link
% ls -l some_file some_link
-rwxrwxrwx  1 paulr           0 Nov 14 09:37 some_file*
lrwxrwxrwx  1 paulr           9 Nov 14 09:38 some_link -> some_file*
% chmod 222 some_link
% ls -l some_file some_link
--w--w--w-  1 paulr           0 Nov 14 09:37 some_file
lrwxrwxrwx  1 paulr           9 Nov 14 09:38 some_link -> some_file

It appears that chmod changes the object that is pointed to, not the
pointer.  Further, umask is meaningful to creation of the link.

But I could not find anyway to change the filemodes of the link...

Tried looking in the fine manual.  Found no reference.

tia,

			paulr    (Paul Reger)
	      Sequent Computer Systems, Beaverton Oregon
	     {uunet,ucbvax!rutgers!ogccse}!sequent!paulr
-- 
			paulr    (Paul Reger)
	      Sequent Computer Systems, Beaverton Oregon
	     {uunet,ucbvax!rutgers!ogccse}!sequent!paulr

-----------------------------

From: Perry Hutchison <perry at ccssrv.uucp>
Subject: Re: symbolic link filemodes unchangeable.
Date: 14 Nov 89 23:20:24 GMT
Keywords: ln, links, symbolic
To:       info-unix at sem.brl.mil

In article <24818 at sequent.UUCP> paulr at sequent.UUCP (Paul Reger) writes:

> Why can't you change the filemodes of a symbolic link ? :

Another candidate for the Frequently Asked Questions list.

There is no need to set the permissions of a symbolic link, because they are
never used.

Hard links have existed for a long time, but symbolic links are a more recent
development.  It has always (at least since 6th edition) been the case that
the permissions belong to the file, and are not affected by which name (link)
is used to access it.  Symbolic links continue to behave in this same way.

That a symbolic link even has its own set of permissions is largely an
artifact of the implementation.  Perhaps someday ls will be revised to omit
them, since they are meaningless (and hence to display them is confusing).

-- 
  The "From" address in the header does not work.
  This does:   ... tektronix!sequent!ccssrv!perry

-----------------------------

From: "Conor P. Cahill" <cpcahil at virtech.uucp>
Subject: Re: symbolic link filemodes unchangeable.
Date: 16 Nov 89 00:43:52 GMT
Keywords: ln, links, symbolic
To:       info-unix at sem.brl.mil

In article <24818 at sequent.UUCP>, paulr at sequent.UUCP (Paul Reger) writes:
> Why can't you change the filemodes of a symbolic link ? :

Because the modes of the link are never used.  Restricting the write 
access on the link file does not restrict the write access on the 
file that it is linked to.  That is why there is no lopen(), or lchmod()
system call (would be similar to lstat()).



-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

-----------------------------

From: Dan Mercer <mercer at ncrcce.stpaul.ncr.com>
Subject: Re: VI & spell
Date: 14 Nov 89 18:44:02 GMT
Keywords:
To:       info-unix at sem.brl.mil

In article <4525 at ski.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
:In article <740 at uc.msc.umn.edu> glex at uf.UUCP (Jeffrey Gleixner) writes:
:\I finally have gotten so sick of typo's that I want to run spell while in
:\vi, without exiting or suspending, the file.   So I wrote a small script (sp).
:\It takes the input from vi (:1,$!sp) and redirects it to a file, I run
:                             ^^^^^^^
:This command will overwrite the buffer with the output from sp.
:The following command will just feed the buffer to sp:
:
:   :w !sp
:
:Notice the space between the `w' and the `!'.
:
:\spell on the file, pulling up a window (Sun) displaying the output from spell.
:\The window waits for a <CR> and then exits.  Well that works just fine EXCEPT 
:\that I can't continue with vi until I exit the window, probably waiting for 
:\the !sp to finish.
:
:Indeed.  Try something like this for sp (without the indentation!):
:
:   #!/bin/sh
:
:   cat > /tmp/sp.$$
:   trap '' 2 18 21 22  # trap SIGINT, SIGTSTP, SIGTTIN and SIGTTOU
:   (
:       # do funny stuff here
:   ) & # maybe some redirections are appropriate
:
:sp exits while its child will continue processing in the background.
:If you don't trap the stop signals, something `funny' happens when you
:stop vi (^Z) while the background job is still running, so that it would
:be stopped too, implicitly: (relevant BSD kernel code)
:
:   case SIGTSTP:
:   case SIGTTIN:
:   case SIGTTOU:
:       /*
:        * Children of init aren't allowed to stop
:        * on signals from the keyboard.
:        */
:       if (p->p_pptr == &proc[1]) {
:           psignal(p, SIGKILL);
:           continue;
:       }
:
:The stop signal is changed to a kill signal!
:BTW, how about the following, Mr. Bourne?!
:
:   trap '' SIGINT SIGTSTP SIGTTIN SIGTTOU
:or
:   trap '' INT TSTP TTIN TTOU
:-- 
:"Richard Sexton is actually an AI program (or Construct, if you will) running
:on some AT&T (R) 3B" (Richard Brosseau) | maart at cs.vu.nl, mcsun!botter!maart

On our SYSV Towers,  spell is implemented as a very inefficient shell
script,  with /usr/lib/spell/spellprog as the actual program (although
it requires a word/line input).  I de-engineered it and turned it into
Spell,  designed not only to proofread,  but to mark errors

=======================CUT HERE============================
HLISTA="/usr/lib/spell/spellprog /usr/lib/spell/hlista"
TMP=/usr/tmp/Spell$$

SCRIPT=

for i in `tee $TMP | deroff -w | $HLISTA`
    do
    SCRIPT="${SCRIPT}s/$i/\/\/\/${i}\/\/\//g
"
    done

sed "$SCRIPT" $TMP

rm $TMP

exit 0
=======================CUT HERE============================

the following two command in my .exrc file invoke it:

map ^V<ESC>s !}Spell^V^M/\/\/\/^Mw
map! ^V<ESC>s ^V<ESC>!}Spell^V^M/\/\/\/^Mw

============================================================

Now is the winter of ourr discontemt made weerder
by the moment by trying to think up sammple paragrafs
to demo this shit.


================is replaced by==============================

Now is the winter of ///ourr/// ///discontemt/// made ///weerder///
by the moment by trying to think up ///sammple/// ///paragrafs///
to ///demo/// this ///shit///.

============================================================

Of course,  this cores on our old news machine (Tower 1650).


On our normal machines,  it works quite well and speedily.

Normal disclaimers apply.

Does anyone know how spellprog works - the format of the spell
databases?  If I knew I'd do this up right.


-- 

Dan Mercer
Reply-To: mercer at ncrcce.StPaul.NCR.COM (Dan Mercer)

-----------------------------

From: Bob Goudreau <goudreau at dg-rtp.dg.com>
Subject: Re: Some questions about POSIX headers
Date: 14 Nov 89 20:13:23 GMT
Sender: usenet at xyzzy.uucp
To:       info-unix at sem.brl.mil

In article <6622 at portia.Stanford.EDU> karish at forel.stanford.edu (Chuck Karish) writes:
>
>    Under ANSI C, _LOW, _HIGH, __s, and __v are all reserved to the
>    library implementor if they're external identifiers, because they
>    all start with underscores.  In any standard header, they'll
>    become externals when the header is #included with external scope.
>
>    The question now becomes, is the header part of the library
>    implementation or not?  If any compiler other than the native one
>    will use these headers, the answer had best be `not'.
>
>    These identifiers are OK with file scope or smaller inside a C
>    library implementation, but not as external identifiers.

Here's what the Dec. 7, 1988 ANSI draft says about the matter:

	4.1.2.1  Reserved Identifiers

	Each header declares or defines all identifiers listed in its
	associated section, and optionally declares or defines
	identifiers listed in its associated future library directions
	section and identifiers which are always reserved either for
	any use or for use as file scope identifiers.

	+  All identifiers that begin with an underscore and either an
	   upper-case letter or another underscore are always reserved
	   for any use.

	+  All identifiers that begin with an underscore are always
	   reserved for use as identifiers with file scope in both the
	   ordinary identifier and tag name spaces.

	....


Since _LOW, _HIGH, __s and __v all fall into the first category ("always
reserved for any use"), the implementation is free to do what it wants
with them.  But note that if _s had been used instead of __s, only the
second category would have applied.

 ------------------------------
Bob Goudreau				+1 919 248 6231
Data General Corporation		...!mcnc!rti!xyzzy!goudreau
62 Alexander Drive			goudreau at dg-rtp.dg.com
Research Triangle Park, NC  27709, USA

-----------------------------

From: Phil Hughes <fyl at ssc.uucp>
Subject: Re: ESIX
Date: 14 Nov 89 20:38:05 GMT
To:       info-unix at sem.brl.mil

In article <2559B869.26977 at maccs.dcss.mcmaster.ca>, rho at maccs.dcss.mcmaster.ca (Raymond Ho) writes:
> Hi everyone,
> 
> 	I'm plan to get a set of Unix Sys V variant for my 386 computer.
> However, there're so many of them out there and I hope you guys/gals and
> help.
> 
> 	I've heard of the one called "ESIX". Its price interests me very much.

> 	Do you know anything about this ESIX? They said it is compatible at
> binary level with Xenix and Unix, is it true?

I have had ESIX since it was called ENIX.  The good part is, yes, it is
real UNIX 5 Release 3.2.  And it almost works ok.
Note that I was one of the people who had the beta release and sent
zillions of documentation corrections to Everex as well as a few software
bug reports.

Now, for the bad stuff.  In the first production release there were a few
bugs.  X-windows was sick and there is a bug in the console driver that
causes lost interrupts (on other devices) when you change screens.  Not
bad except I cannot get an update.  We have called Everex (Ida Wu, head of
ESIX marketing) at least 3 times, left phone-mail messages and never got an
answer.  Abount 3 weeks ago I wrote a threatening letter complaining about
this and asking for a resolution within 2 weeks or I would sent a copy of
the letter to UNIX * magazines.  No response.  I sent e-mail to Everex
last week.  No response.

I gave up and sent the letter.  I would still like the update.  I'm still
amazed.

-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
    amc-gw!ssc!fyl or uunet!pilchuck!ssc!fyl or attmail!ssc!fyl

-----------------------------

From: Bob Palowoda <palowoda at fiver.uucp>
Subject: Re: ESIX
Date: 15 Nov 89 07:13:38 GMT
To:       info-unix at sem.brl.mil

>From article <1595 at crdos1.crd.ge.COM>, by davidsen at crdos1.crd.ge.COM (Wm E Davidsen Jr):
> In article <2559B869.26977 at maccs.dcss.mcmaster.ca>, rho at maccs.dcss.mcmaster.ca (Raymond Ho) writes:
> 	[  many features of ESIX  ]
> 
>   I believe that these are all correct, but check that the base price
> includes TCP support, because I have one ad here which list all the
> other stuff but no TCP.
 
  It's in there. Support for the Everex, 3Com, and WD controllers.
  I'm useing it on some WD8003E cards, with NFS connect to a PC-DOS
  cleint.
  
> |  also some reports claim that ESIX is the fastest Unix Sys V available for pcs.

  To general of a statement. There product is fast but when I try to compile
15 large programs and the news feed comes in with 5 megs of files and two
bbs users call in the system tends to slow up. :-)


-- 
Bob Palowoda  pacbell!indetech!palowoda    *Home of Fiver BBS*  login: bbs
Home {sun|daisy}!ys2!fiver!palowoda         (415)-623-8809 1200/2400
Work {sun|pyramid|decwrl}!megatest!palowoda (415)-623-8806 2400/9600/19200 TB
Voice: (415)-623-7495                        Public access UNIX XBBS   

-----------------------------

From: bill birch <bill at ibmpcug.co.uk>
Subject: Re: HOW DO I UNBLOCK A SERIAL LINE ON SUN3?
Date: 14 Nov 89 22:34:49 GMT
Sender: Super User <root at ibmpcug.co.uk>
To:       info-unix at sem.brl.mil

In article <21267 at adm.BRL.MIL> charles at sifvx6.sinet.slb.com writes:
> I have a problem on a SUN3/60 OS3.5 serial link from /dev/ttya to a plotter
> which uses XON/XOFF for flow control. If someone cycles the plotter power in
> mid-plot (eg to unblock the paper feed), the serial line hangs because the SUN
> is waiting for XON (^Q) and the plotter is not clever enough to send XON when

I have had similar problems in the past, but with the Baud rate. 
The trick is to sleep a process on the device thusly:

	sleep 1000000 >/dev/tyya &

What happens is that when the last process  that was using the device


Hope this helps.

-----------------------------

From: Perry Hutchison <perry at ccssrv.uucp>
Subject: Re: Berkeley Unix on PC?
Date: 14 Nov 89 23:03:30 GMT
To:       info-unix at sem.brl.mil

In article <BRISTER.89Nov11093623 at aries.td2cad.intel.com>
brister at td2cad.intel.com (James Brister) writes:

> Is there a Berkeley based unix available for desktop sized computers?

A Sun 3/50 or 3/60 is easily desktop-sized -- it's not much bigger than an
IBM AT. SunOS is a 4.2 BSD derivative with many SysV extensions.

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: Berkeley Unix on PC?
Date: 15 Nov 89 23:56:33 GMT
To:       info-unix at sem.brl.mil

In article <832 at ccssrv.UUCP> perry at ccssrv.UUCP (Perry Hutchison) writes:
>A Sun 3/50 or 3/60 is easily desktop-sized -- it's not much bigger than an
>IBM AT. SunOS is a 4.2 BSD derivative with many SysV extensions.

Actually, the latest release should be based on UNIX System V Release 4.0,
which merges System V, SunOS (4.2BSD), and Xenix into a single system.

Suns do seem to be popular desktop UNIX platforms.  I'm sure there are
others, which should be easy to find in any of the trade journals.

-----------------------------

From: neese at adaptex.uucp
Subject: How to choose SCSI
Date: 14 Nov 89 23:33:00 GMT
Nf-ID: #N:adaptex:6900004:000:12910
Nf-From: adaptex.UUCP!neese    Nov 14 17:33:00 1989
To:       info-unix at sem.brl.mil


The following is inetended for those who may have or are thinking about
purchasing a SCSI subsytem.

THE HOST ADAPTER: THE FIRST PIECE OF THE PUZZLE

  Host adapters come in many flavors.  Some are well supported, others are
not.  Some are intelligent, some are not.

  To decide on the correct host adapter to use is a difficult decision and
one that should not be taken lightly.  Unless you are prepared to continue
investing in other adapters as your systems needs grow, you need to study and
understand the different types of host adapters and the application they are
going to be used in.

  The simplest host adapters are cards that may have an INT13 At BIOS to
support hard drives under MS-DOS.  These host adapters usually have no UNIX
support as it is very difficult to do a device driver that can be made to work
reliably.  Dumb cards such as these usually have timing constraints that make
it almost impossible to have a UNIX driver.

  The next level of host adapter goes to the other extreme.  They are very
intelligent and usually hide the SCSI bus from the operating system.  These
types of adapters have a wide base of support in software, as they can run
in any environment with very little software effort.  They are also expensive
adapters, which may not be needed in the MS-DOS machine.  Indeed, they may be
overkill for a machine that is to be relegated to the DOS environment.

  If you are going to be using MS-DOS and MS-DOS alone, then the low cost
approach is not a bad one.  But if you intend to use UNIX/Novell/OS2, then
the low cost approach will be a poor one.  These operating systems/environments
are all multi-threaded.  That is they can issue more than one command at a
time.  With an intelligent host adapter, this is easily done and managed by
the host adapter.  With a low cost board, the software to do this work must
be driven by the main CPU, which will incur considerable command overhead.

  Of course, there is also the support issue.  You always would like to
avoid the finger pointing that can occur when using products from several
companies, when a bug arises.  This is best done by buying a product that
is supported by the operating system manufacturer.  There are very few
SCSI host adapters supported by the operating systems manufacturers.  You
need to ask them what they will support and what they won't.  A little
planning in this area may solve many potential problems for you.
  
	Questions you should ask:
	a) What operating environment will I be using?
	b) Is the operating environment multi-threaded?
	c) Am I going to be using several operating systems?
	d) Do I care if support is from one operating system vendor?

  
SCSI DEVICES AND MANUFACTURER'S CLAIMED DATA RATES

  Ignore the manufacturer's rated data rates.  They are measured on the SCSI
bus assuming that no data is being transferred to the device buffer from
the media and they also assume the best case data transfer (no disconnects).

To get an idea of how a device might perform, look at the clock rate of
the head.  You will see a range from 7.5 Mhz to 24 Mhz.  Some devices
have multiple clock rates.  These are bit zone recorded devices.  They have
more sectors on the outer tracks than they do on the inner tracks.

  The data rate to the devices buffer is the rate of the clock on the head.
A 7.5Mhz head moves data to the buffer at 750KB/sec and a 24Mhz clock on
the head moves data at 2.4MBytes/sec.

  Data rates to/from the buffer from/to the SCSI bus are regulated by the clock
rate of the dual ported buffer (where applicable).  If the buffer has a 4MHz
clock, then the fastest the data can be shipped to/from the buffer is 4MBytes/
sec, but if data is being shipped to/from the media from/to the buffer, then
the rate that data can move across the SCSI bus is directly impacted.  For
instance, if the drive is putting data into the buffer at 2.0MBytes/sec and the
buffer is a 4MHz part.  The fastest data can be moved to the SCSI bus is
2.0MBytes/sec not 4MBytes/sec.  This, of course, only applies to those devices
that have a dual ported buffer.  How the buffer full/empty ratios are used will
also effect the data rate.

  SCSI devices, for the most part, have programmable buffer full/empty ratios
stored in a mode page of the device.  NOTE:  Not all devices allow a user to
reprogram these parameters.  These parameters affect when the device should and
should not, get on the SCSI bus for a data transfer.  Typically, a SCSI device
will ask for the bus, on a read, when there is at least 1 sector in the data
buffer ready to transfer.  The transfer will start and the device will continue
to put data into the buffer if possible, as data is taken out of the
buffer.  If the buffer falls below the 1 sector limit, then the device will
disconnect from the bus and will not reconnect until the buffer has at least
one sector's worth of information.

	Questions you should ask:
	a) How fast is the dual ported buffer?
	b) What is the clock rate of the heads?
	c) Is the device capable of synchronous transfers?
	d) How is the buffer full/empty ratios calculated and implemented?


TO BUFFER OR NOT TO BUFFER?

  The size of the buffer has a lot to do with the overall performance of the
SCSI device.  Buffer sizes range from 16K to 256K.  If the buffer is not dual
ported, then that implies the device cannot allow data to be moved from/to the
SCSI bus while the HD is moving data to/from the buffer and vice-versa.

  If the buffer is just a buffer to smooth the data transfer, then the size of
the buffer can be small if you have a host adapter capable of moving the data
at the full rate of the SCSI bus.  If the adapter is dumb and cannot move data
very quickly, then a larger buffer is required to minimize the disconnects/
reconnects on the SCSI bus.  In this implementation, the size of the buffer
will not impact nor help performance.  Also, with a dumb adapter you will
find it very difficult to maintain a 1:1 interleave with this type of buffering
scheme.  Typically, this is the poorest performing SCSI device.

  If the device has a read ahead buffer, then sequential accesses will be
much quicker.  Although the more fragmented the file system the worse the
worse the performance.  In this case, the size is dependent on the overall
implementation.  If the read ahead will abort at the end of a track, then the
buffer need not be larger than the largest track on a device.  If the read
ahead is aborted at a cylinder switch, then the buffer size should be large
enough to accommodate the largest cylinder.  For the most part, this is a good
implementation.

  If the device has a read ahead cache buffer, then this, like the read ahead
buffer, will give good sequential accesses, but still poor performance on a
very fragmented filesystem.  As data in the buffer is recoverable, because
this is a cache, some performance gains will be noticed in a multi-user
environment.  The same rules for the read ahead buffer above apply when it
concerns the size of the buffer.  A better performance implementation.

  If the device has a segmented cache buffer, then this will yield the
best performance available in all operating environments.  It must be tunable
so you can match the characteristics of the operating environment.  The size
of the buffer should not be less than 64K for this type of implementation to
be effective,  but it can be as large as the vendor chooses and the bigger
the better.  This is the best performance choice.

	Questions you should ask:
	a) What type of buffer algorithm do you use?  (i.e. read-ahead, cache)
	b) Is the buffer algorithm programmable?
	c) What is the size of the buffer?
	d) What is the clock (or resolution) of the buffer?
	e) Is the buffer dual ported?


SCSI COMMAND OVERHEAD

  SCSI command overhead is a much discussed topic when users opt to go with
SCSI and generally a very heated topic.  In the past, the overhead was very
high (on the order of 3 milli-seconds).  Today SCSI overhead, for the device,
is down to 1 milli-second and less.  Some devices have multiple processors, one
for running the SCSI bus and one for the device electronics.  These type of
devices have less overhead than a single processor device as they can do things
in parallel.  Be aware of the manufacturers specs.  Though they don't lie, they
publish the best case overhead times.  SCSI command overhead, as measured by
the manufacturer, is typically taken from the time a TEST UNIT READY command
takes to complete. The problem with that is this command takes the shortest
path through the vendor's firmware as it does not require any data transfers.

  The best way to measure the overhead for a SCSI device is to issue a write
command and then issue the same command again, to ensure the device is at the
track it should be.  Using a logic analyzer, measure the time from the last
command byte to the ending status phase for the second write command.  Subtract
the data phase of the command and you will have a more believable idea of the
overhead.  The reason you want to use a write command is to eliminate any disk
latency that a read command would generate.

  Measuring overhead from the system level is virtually impossible, as you also
have the host adapter overhead and then the bus and CPU rates come into play.

	Questions you should ask:
	a) What is the SCSI command overhead for your controller?
	b) How is the overhead measured?
	c) Does your device have multiple processors?
	d) What is the clock rate of the processors?


BENCHMARKING MADE EASY??

  Throw away CORETEST, or disregard the seek times and the size of the
request.  Seek times on a SCSI device cannot be measured at the BIOS level
unless the benchmark can be told what physical parameters to use.

  SCSI is a logical block interface and has no physical characteristics.  The
number of heads, sectors, and cylinders at the BIOS level are all incorrect, so
the seek times that virtually all of the benchmark programs use will not yield
accurate seek times.

  You cannot use the manufacturer's seek rate as it is measured at the
mechanical level and not at the SCSI bus level.  To test the seek times, you
almost have to write your own benchmark.  If 'adaptex' was going to be around
I would have a program that would do just that for SCSI devices and post it,
but alas.

  CORETEST also reads the same data over and over again, so a SCSI device that
has a read ahead buffer, will not be accurately measured.

  In order to get a fair idea of the data rates that a SCSI device can yield
requires you to measure data transfers in the following ways:

	1) Sequentially
	2) Random (1/3 stroke, preferred as you can do that at the BIOS level)
	3) Read the same data over and over again.

  Now that will take care of the single-threaded benchmark, but what UNIX/XENIX
and other multi-threaded operating environments?  While none of the current
benchmarks really do a fair job of measuring the correct thing for these
environments, they can yield some useful information.

  With a multi-threaded environment, you should not only consider the average
access time and the data rate, but more importantly.  How does the SCSI
implementation I have chosen effect the overall throughput of my system?  While
in a single-threaded environment most devices will benchmark well, device
characteristics change dramatically in a multi-threaded mode.

  This is due in part to the devices ability to efficiently arbitrate for the
SCSI bus.  Some devices may take as long as 3 milli-seconds to complete an
arbitration cycle, while others take only 1 milli-second.  The only way you
can judge the devices is via a logic analyzer.  You are basically looking
for the overall usage of the SCSI bus.

	Questions you should ask:
	a) How can I measure the average seek time?
	b) What environment will this implementation be used in?
	c) How can I best judge the performance in this environment?


PERSONAL PERFORMANCE RATING

If I had to rate, regardless of capacity, the best performing SCSI devices
that I have used, the list would go:

Quantum		(3 1/2") 64K segmentable cache buffer, RLL 2.7, ZBR
			 async/sync
Quantum		(5 1/4") 64K segmentable circular cache buffer, RLL 2.7, async
Imprimis	(5 1/4") 32K read ahead buffer (*), RLL 2.7, ZBR, async/sync
Maxtor		(5 1/4") 45K read ahead buffer (*), RLL 2.7, async/sync
Micropolis	(5 1/4")
Priam		(5 1/4")
Imprimis	(3 1/2")
Maxtor		(3 1/2") 8K buffer, RLL 2.7, async
Seagate		(5 1/4") Basic buffer
Conner		(3 1/2") Basic buffer
Rodime		(3 1/2") Basic buffer

* Drives come with read ahead disabled.  It can only be activated via
  software

Recomended products to avoid

Cast/Newbury	Do not meet SCSI standard (Rev17B)
Microscience	Do not meet SCSI standard (Rev17B)

TERMS
ZBR	Zone Bit Recorded


			Roy Neese
			Adaptec Central Field Applications Engineer
			UUCP @ {texbell,attctc}!cpe!adaptex!neese
				merch!adaptex!neese

-----------------------------

From: "Ronald S. Woan" <ron at woan.austin.ibm.com>
Subject: Re: export vars from cshell script?
Date: 15 Nov 89 00:21:58 GMT
Sender: news at awdprime.uucp
To:       info-unix at sem.brl.mil

In article <1815 at gazette.bcm.tmc.edu>, heidi at kiwi.bcm.tmc.edu (Heidi 
writes:
> Is there an equivalent in the Cshell to the Bourne shell's export
> facility?  We have would like to define new environment variables in a
> shell, and have them be known to subsequent processes.

I may be way off base, but I have always been under the impression that
setenv automatically exported them??!!

							Ron
+-----All Views Expressed Are My Own And Are Not Necessarily Shared By------+
+------------------------------My Employer----------------------------------+
+ Ronald S. Woan  (IBM VNET)WOAN AT AUSTIN, (AUSTIN)ron at woan.austin.ibm.com +
+ outside of IBM       @cs.utexas.edu:ibmaus!auschs!woan.austin.ibm.com!ron +
+ last resort                                        woan at peyote.cactus.org +

-----------------------------

From: Randal Schwartz <merlyn at iwarp.intel.com>
Subject: Re: a perl question
Date: 15 Nov 89 01:24:19 GMT
Sender: news at omepd.uucp
Posted: Tue Nov 14 17:24:19 1989
To:       info-unix at sem.brl.mil

In article <RJK.89Nov9162936 at sawmill.uucp>, rjk at sawmill (Richard Kuhns) writes:
| I'm not entirely sure that this is the newsgroup I should use, but
| I've seen a number of perl questions/answers and I don't know of a
| better newgroup (until comp.lang.perl comes along).
| 
| My question:  I'd dearly love to have a filter, written in perl (the
| rest of the code for this project is in perl, and I'll post it when I
| get it working), which would turn the string `B^HBO^HOL^HLD^HD' into
| `$bold_startBOLD$bold_end', where $bold_start and $bold_end are
| predefined character strings.  I have a filter that does this already
| written in C, but it seems to me I should be able to do it easier in
| perl (using regular expressions?), but I can't come up with a good way
| to do it.  /(.)\010$1/ recognizes one element of such a string (always
| the first).  s/(.)\010$1/$1/g specifically does NOT work (it only
| changes the first occurence).

I saw this question come through the perl-users at virginia.edu mailing
list first, but I'll post my reply here (being the token Perl
wizard...:-):

#!/usr/bin/perl
$bold_start = "whatever"; $bold_end = "whatever";
while (<>) {
	if (/\010/) {
		s/(.)\010\1/\201\1\202/g; # surround bold with \201 and \202
		s/\202\201//g; # optimize away all end-start pairs
		s/\201/$bold_start/og; # replace start with real start
		s/\202/$bold_end/og; # and likewise for end
	}
	print;
}

There you have it.  OK, so it's not a one-liner... big deal.

Just another Perl hacker,
(lwall says he's "Not just another Perl hacker"... :-)
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/

-----------------------------

From: wyle at inf.ethz.ch (Mitchell Wyle)
Subject: Re: vi editor enhancement request
Date: 15 Nov 89 09:01:47 GMT
Keywords: vi display
To:       info-unix at sem.brl.mil

In article <456 at tron.UUCP> wali at tron.UUCP (Saleem Wali) writes:
> (vi editor) Is there anyone who knows of a utility which allows "vi" to
> display various information, e.g., the filename, time, and
> whether I am in the insert mode or in the command mode, at the top of 
> the screen.

The control-G command will give you file name, if modified, line number and
current position as a percentage.    :set modeline might also help.
Vi intentionally does not put all kinds of crap on your screen (like
wordstar) other than the text.  This philosophy helps at low baud rates; I
admit that "modes" is a weakness, but you can get used to them.

>**   Westinghouse Electric Corp.   *    New on the job                  **

If you  hack the sources of stevie or the "S" vi clones to put up this mode
stuff on the top line, please post them.

-Mitch (vi fanatic) Wyle

-----------------------------

From: Kenneth L Moore <yahoo at unix.cis.pitt.edu>
Subject: Re: vi editor enhancement request
Date: 15 Nov 89 21:09:49 GMT
Keywords: vi display emacs
To:       info-unix at sem.brl.mil

In article <5530 at ethz-inf.UUCP> wyle at ethz.UUCP (Mitchell Wyle) writes:
>In article <456 at tron.UUCP> wali at tron.UUCP (Saleem Wali) writes:
==>==> (vi editor) Is there anyone who knows of a utility which 
==>==> allows "vi" to
==>==>**   Westinghouse Electric Corp.   *    New on the job      
==>
==>-Mitch (vi fanatic) Wyle

You two might want to think about switching to emacs. 

The file name is always displayed. Command and insert are unambiguous.

Emacs even allows for the execution of unix commands while in the
editor. For example: I type Capture Command Output then type date. This
gives me the time in my file at the current cursor position. There are
infinite variations on this theme. (You might dump the result to a
buffer. You may want to to an ls -l on the file you are working on,
etc.)
 
Here is an example:

Wed Nov 15 15:54:40 EST 1989

The big deal though is that emacs is "universal".  We currently have 3
versions of emacs (that I know of) one on the VAX, one on our Ultrix and
one on our Suns.  I currently switch from machine to machine with very
little difficulty.  Caveat: A few of the commands are slightly
different.

It is difficult to change editors but in this case it is worth it. IMHO.

See newsgroup gnu.emacs

-- 
                 yahoo at unix.cis.pitt.edu (Kenneth L Moore)

-----------------------------

From: Randal Schwartz <merlyn at iwarp.intel.com>
Subject: Re: vi editor enhancement request
Date: 16 Nov 89 00:57:26 GMT
Sender: news at omepd.uucp
Keywords: vi display
To:       info-unix at sem.brl.mil

In article <456 at tron.UUCP>, wali at tron (Saleem Wali) writes:
|  Now that I have your attention.............
|  (vi editor) Is there anyone who knows of a utility which allows "vi" to
|  display various information, e.g., the filename, time, and
|  whether I am in the insert mode or in the command mode, at the top of 
|  the screen.

yeah, have your sysadm do "mv /usr/local/emacs /usr/ucb/vi" :-)

Otherwise, no luck.  You can press ^G a lot, but that doesn't really
help.  To find out if you are in insert mode, hit ESC, and if it
doesn't beep, you *were* in insert mode.

What can I say, it's "vi".  (or is that "vee-eye"?? :-)

Just another satisfied GNU-EMACS (former vi) user,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/

-----------------------------

From: Charleen Bunjiovianna <charleen at cinnamon.ads.com>
Subject: Re: vi editor enhancement request
Date: 16 Nov 89 02:33:16 GMT
Sender: news at ads.com
Keywords: vi display emacs
To:       info-unix at sem.brl.mil

I can't take this any more.  Is this guy for real?

In article <20668 at unix.cis.pitt.edu> yahoo at unix.cis.pitt.edu (Kenneth L Moore) writes:
>In article <5530 at ethz-inf.UUCP> wyle at ethz.UUCP (Mitchell Wyle) writes:
>>In article <456 at tron.UUCP> wali at tron.UUCP (Saleem Wali) writes:
>==>==> (vi editor) Is there anyone who knows of a utility which 
>==>==> allows "vi" to
>==>==>**   Westinghouse Electric Corp.   *    New on the job      
>==>
>==>-Mitch (vi fanatic) Wyle
>
>You two might want to think about switching to emacs. 
>[...]
>The big deal though is that emacs is "universal".  

Like hell it is.  Not only are there significant differences in
commands from version to version, but some sites don't even have
emacs installed because they can't afford the overhead.

Charleen


I put some instant coffee in a microwave and almost went back in time.
                                 -- Steven Wright

-----------------------------

From: "Ronald K. Wright" <rwright at novavax.uucp>
Subject: Re: vi editor enhancement request
Date: 16 Nov 89 11:38:05 GMT
Keywords: vi display
To:       info-unix at sem.brl.mil

wali at tron.UUCP (Saleem Wali) writes:
> (vi editor) Is there anyone who knows of a utility which allows "vi" to
> display various information, e.g., the filename, time, and
> whether I am in the insert mode or in the command mode, at the top of 
> the screen.

Such is available on the ATT 3B1 when using an ATT610 terminal.
Likewise, in Tandy Xenix using the ATT610.  I have no idea what
drives it, but when you are in insert, a small ins appear on the
bottom of the 610's screen.  Thus there is a signal about insert.

No other terminal machine which I have used seems to have it.
-- 
R. K. Wright MD JD                     | office: medexam!rkw
Chief Medical Examiner, Broward County | nova:   novavax!rwright
Associate Professor Pathology          | home:   medexam!love1!rkw
University of Miami School of Medicine | fax:    305 765 5193

-----------------------------

From: William Walker <wrwalke at prcrs.uucp>
Subject: Re: vi editor enhancement request
Date: 16 Nov 89 16:17:32 GMT
Keywords: vi display emacs
To:       info-unix at sem.brl.mil

In article <20668 at unix.cis.pitt.edu>, yahoo at unix.cis.pitt.edu (Kenneth L Moore) writes:
> In article <5530 at ethz-inf.UUCP> wyle at ethz.UUCP (Mitchell Wyle) writes:
> >In article <456 at tron.UUCP> wali at tron.UUCP (Saleem Wali) writes:
> ==>==> (vi editor) Is there anyone who knows of a utility which 
> ==>==> allows "vi" to
> ==>==>**   Westinghouse Electric Corp.   *    New on the job      
> ==>
> ==>-Mitch (vi fanatic) Wyle
> 
> You two might want to think about switching to emacs. 
> The big deal though is that emacs is "universal".  We currently have 3
> versions of emacs (that I know of) one on the VAX, one on our Ultrix and
> one on our Suns.
> 
> It is difficult to change editors but in this case it is worth it. IMHO.
> 

check out emacs vi-mode, you can map it to act like the real thing and
keep all of your emacs-specific functions (rmail, dired, terminal windows
for cut/pasting, etc.).  this helps to ease the VI-folks into the emacs
world without creating the editor wars once again so recently fought 
on this group.

** PLEASE __ no editor(1) vs. editor(2) battles, everyone has their
**           favorites by now (comp.religion.editors??)

bill.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   William Walker   ---   wrwalke at prcrs.UUCP   ---   530N-3    703-556-2565
 Quote of the week:  UNIX is a trademark of AT&T, so is the "Princess Phone".
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-----------------------------

From: Wm E Davidsen Jr <davidsen at crdos1.crd.ge.com>
Subject: Re: vi editor enhancement request
Date: 16 Nov 89 21:30:36 GMT
Keywords: vi display emacs
To:       info-unix at sem.brl.mil

In article <15948 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:

| 2. Why is emacs more universal than vi, if emacs is NOT shipped by
|    default with most Unix systems, while vi IS shipped by default with
|    most (if not all -- anybody here work on a system that doesn't have
|    vi :-) Unix systems?

  emacs is more universal because it is on more types of systems. If you
are operating in a very sheltered environment which is UNIX only you
don't care, but having portable p.d. version of emacs makes it more
widely available.

  This should not be confused with a claim that available=better, just
an explanation of propigation in the real world.
-- 
bill davidsen	(davidsen at crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

-----------------------------

From: Gerald Partsch <gsp98 at wash08.uucp>
Subject: Re: vi editor enhancement request
Date: 17 Nov 89 00:50:05 GMT
Keywords: vi display
To:       info-unix at sem.brl.mil

In article <5530 at ethz-inf.UUCP> wyle at ethz.UUCP (Mitchell Wyle) writes:
>In article <456 at tron.UUCP> wali at tron.UUCP (Saleem Wali) writes:
>> (vi editor) Is there anyone who knows of a utility which allows "vi" to
>> display various information, e.g., the filename, time, and
>> whether I am in the insert mode or in the command mode, at the top of 
>> the screen.
>
>The control-G command will give you file name, if modified, line number and
>current position as a percentage.    :set modeline might also help.
>Vi intentionally does not put all kinds of crap on your screen (like
>wordstar) other than the text.  This philosophy helps at low baud rates; I
>admit that "modes" is a weakness, but you can get used to them.
>
>>**   Westinghouse Electric Corp.   *    New on the job                  **
>
>If you  hack the sources of stevie or the "S" vi clones to put up this mode
>stuff on the top line, please post them.
>
>-Mitch (vi fanatic) Wyle

If you include the following lines in your ".exrc" file, you will get 
a status line at the bottom of the screen that displays "INPUT MODE"
when you are in input mode and displays nothing when in command mode.
They also number the lines in the file.

	.exrc
	-----
		set showmode
		set number

A <ctrl-G> displays the following information:

	"filename" line x of y -- % --

-----------------------------

From: David B Stewart <dstewart at fas.ri.cmu.edu>
Subject: Re: vi editor enhancement request
Date: 17 Nov 89 04:49:27 GMT
Keywords: vi display emacs
To:       info-unix at sem.brl.mil

In article <15948 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:
>In article <20668 at unix.cis.pitt.edu> yahoo at unix.cis.pitt.edu (Kenneth L
>Moore) writes:
>>The big deal though is that emacs is "universal".  We currently have 3
>>versions of emacs (that I know of) one on the VAX, one on our Ultrix and
>>one on our Suns.  I currently switch from machine to machine with very
>>little difficulty.  Caveat: A few of the commands are slightly
>>different.
>
>  Emacs is "universal"?  Two questions about this:
>
>2. Why is emacs more universal than vi, if emacs is NOT shipped by
>   default with most Unix systems, while vi IS shipped by default with
>   most (if not all -- anybody here work on a system that doesn't have
>   vi :-) Unix systems?


I like 'vi', and I don't with all my personal macros, and a Sun Workstation
with multiple windows, I don't see enough reasons to switch to Emacs.
(But Don't start telling me all the advantages, I'm sure I've heard them 
all from my emacs-fanatic office mate).  

The funniest thing is that when my office mate was forced to install
a new system, he had to learn 'vi' just to be able to set up the system
and install Emacs.  So much for Emacs being "universal"!

"Long Live VI, and Long Live the UNIX Command Line" :-)

~dave


-- 
David B. Stewart, Dept. of Elec. & Comp. Engr., and The Robotics Institute, 
	Carnegie Mellon University,  email: stewart at faraday.ece.cmu.edu 
The following software is now available; ask me for details
        CHIMERA II, A Real-time OS for Sensor-Based Control Applications

-----------------------------

From: "Jonathan I. Kamens" <jik at athena.mit.edu>
Subject: Re: sendmail.cf
Date: 15 Nov 89 10:22:20 GMT
Sender: daemon at bloom-beacon.mit.edu
To:       info-unix at sem.brl.mil

In article <1989Nov13.193000.12827 at tse.uucp> rick at tse.uucp writes:
>Is it possible to change the sendmail.cf file to indicate a different
>host for different local users?
>
>For example: if user1 sends mail the return address looks like user1 at host1;
>but, if user2 sends mail it has the return address user2 at host2 (even though
>they are working on the same machine).

  Yes.  Define several classes read from files in the sendamil.cf
file; each class represents all the users who should be from one
particular host.

  Then, in the sender pre-write you match against each of those
classes and tack on the appropriate host for any matches.

  I'm assuming that you don't want to tack a host on if the user has
manually specified the host himself -- if the user specifies the from
host, then he really wants mail to go there :-).  If you want to
enforce the host divisions, you need to strip off any host specified
by the sender before matching against the classes.  The level of
paranoia and care you take in doing this is up to you.

  Of course, you can do the same thing for recipients if you want mail
to automatically be delivered to the right host, given only the
username.

  All of this is a little dangerous, because you have to keep all
these files up-to-date on all of the hosts involved.  It's usually a
better idea, when a somewhat large number of hosts is involved, to
have a central machine that knows all the usernames, and to forward
all mail to that machine for delivery, instead of trying to put
correct hosts in the sender field.  Give that machine an automatically
generated aliases file that forwards mail to the appropriate mail
hosts.

  (That's how Project Athena mail works.  Athena.mit.edu is actually
just a mailhub which does mailing list expansion and mail delivery to
Athena users, whose mail actually lives on several post office
machines.)

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

-----------------------------

From: Chris Torek <chris at mimsy.umd.edu>
Subject: Re: core files under SV
Date: 15 Nov 89 10:22:49 GMT
To:       info-unix at sem.brl.mil

In article <MRD.89Nov15011304 at image.clarkson.edu> mrd at sun.soe.clarkson.edu
(Michael DeCorte) writes:
>NOTE I want to generate a core file but NOT exit.  Yup I just want to
>go along on my merry way.

(You are not going to like this :-) )

int
make_core_file() {
	int pid = fork(), w, status;
	extern int errno;

	switch (pid) {

	case -1:
/*DEBUG*/	/* perror("cannot fork to make core file"); */
		return (-1);

	case 0: /* child */
		abort();
/*DEBUG*/	/* (void) write(2, "could not make core file\n", 25); */
		_exit(1);
		/* NOTREACHED */
	}
	/* parent */
	/* should use wait4() here, but no one has it yet */
	while ((w = wait(&status)) != pid)
		if (w == -1 && errno != EINTR)
			break;
	if (status & 0200)	/* made a core file */
		return (0);
	return (1);		/* fork succeeded, but no core dump */
}
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris

-----------------------------

From: "Conor P. Cahill" <cpcahil at virtech.uucp>
Subject: Re: core files under SV
Date: 15 Nov 89 16:12:41 GMT
To:       info-unix at sem.brl.mil

In article <MRD.89Nov15011304 at image.clarkson.edu>, mrd at sun.soe.clarkson.edu (Michael DeCorte) writes:
> 
> There has got to be a little function I can call that will generate a
> core file of my process but I sure can't find it in sections 2 or 3.
> Anybody know what it is?
> 
> NOTE I want to generate a core file but NOT exit.  Yup I just want to
> go along on my merry way.

There is no system or library call to do this, but you could just do 
the following:

	if( fork() == 0 )
	{
		abort();
	}

which will result in a core file being generated and letting your
current program continue executing. If you do this alot, without performing
a wait(2), you will eventually run out of process table slots.  So either
do a wait() after the fork(), or limit the number of times you do this.


-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: core files under SV
Date: 15 Nov 89 23:52:40 GMT
To:       info-unix at sem.brl.mil

In article <MRD.89Nov15011304 at image.clarkson.edu> mrd at sun.soe.clarkson.edu (Michael DeCorte) writes:
>There has got to be a little function I can call that will generate a
>core file of my process but I sure can't find it in sections 2 or 3.
>Anybody know what it is?
>NOTE I want to generate a core file but NOT exit.  Yup I just want to
>go along on my merry way.

I could say all sorts of disparaging things about people who think
UNIX would have a single function that performs a particular action
not of general utilit, but I won't :-)

	if ( fork() == 0 )
		abort();

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: core files under SV
Date: 16 Nov 89 00:13:02 GMT
To:       info-unix at sem.brl.mil

In article <11613 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>	if ( fork() == 0 )
>		abort();

As somebody else pointed out, if you do lots of these you also need
to reap the zombies.  The simplest solution to that is

	if ( (pid = fork()) == 0 )
		abort();
	else
		while ( wait( (int*)0 ) != pid )
			;

If you don't want to wait for the core dump to complete before
proceeding, arrange for the dumping child to be detached:

	if ( (pid = fork()) == 0 )
		if ( fork() == 0 )
	                abort();
		else
			_exit( 0 );
	else
		while ( wait( (int*)0 ) != pid )
			;

Note that I've assumed that you aren't performing any wait()s in
signal handlers, because you really shouldn't.

-----------------------------

From: RAMontante <bobmon at iuvax.cs.indiana.edu>
Subject: Re: core files under SV
Date: 17 Nov 89 00:24:30 GMT
To:       info-unix at sem.brl.mil

gwyn at brl.arpa (Doug Gwyn) <11616 at smoke.BRL.MIL> :
-
-	if ( fork() == 0 )
-                abort();
  !			/* [ child not cleaned from proc. table? ] */
-
-As somebody else pointed out, if you do lots of these you also need
-to reap the zombies.
		[ . . . ]
-If you don't want to wait for the core dump to complete before
-proceeding, arrange for the dumping child to be detached:
-
-	if ( (pid = fork()) == 0 )
-		if ( fork() == 0 )
-	                abort();
-		else
-			_exit( 0 );
-	else
-		while ( wait( (int*)0 ) != pid )
-			;

Um, I don't see why this "reaps the zombies".  I thought the `wait(pid)'
call was added to clean up the aborted child --- here the child is
wait()'ed on, but the grandchild looks just like the child did in the
original version.

-----------------------------

From: "Jonathan I. Kamens" <jik at athena.mit.edu>
Subject: Re: Import variables in to awk.
Date: 15 Nov 89 10:35:39 GMT
Sender: daemon at bloom-beacon.mit.edu
To:       info-unix at sem.brl.mil

In article <10531 at thorin.cs.unc.edu> warner at unc.cs.unc.edu (Byron Warner)
writes:
>My questions is how do you import csh variables into an awk script.
>for example if I have a file called foo, which contains:
>{
>	print import,$0
>}
>
>and I issue the command 
>awk -F: -f foo /etc/passwd import='hello
>why do I get just a list of logins?
>Thanx in Advance

  First of all, I have never known the C-shell to allow the syntax
"foo=bar" on a command-line to import a variable into a program.  C
shell doesn't have anything like that.

  Second, the only way to do what you want is to actually make the
creation of this variable part of the awk script.  Like this:

% set import = 'hello'
% awk 'BEGIN { import = "'"$import"'" } { print import, $0}' /etc/passwd

The $import is evaluated before awk is actually called, and replaced
by 'hello' (sans quotes).

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

-----------------------------

From: Chris Torek <chris at mimsy.umd.edu>
Subject: Re: Import variables in to awk.
Date: 15 Nov 89 14:14:02 GMT
To:       info-unix at sem.brl.mil

>In article <10531 at thorin.cs.unc.edu> warner at unc.cs.unc.edu (Byron Warner)
>writes:
[file foo]
>>{ print import,$0 }
[command]
>>awk -F: -f foo /etc/passwd import='hello
>>why do I get just a list of logins?

In article <15919 at bloom-beacon.MIT.EDU> jik at athena.mit.edu
(Jonathan I. Kamens) writes:
>  First of all, I have never known the C-shell to allow the syntax
>"foo=bar" on a command-line to import a variable into a program.

It does not.  However, awk does.  That is, you are looking at the wrong
program.

>  Second, the only way to do what you want is to actually make the
>creation of this variable part of the awk script.  Like this:

Not so:  Within some limits, you can set awk variables from its
invocation.  For instance:

	% cat t
	BEGIN { print "BEGIN: " this; }
	{ print "INPUT: " this " " $0; }
	END { print "END: " this; }
	% cat u
	first line
	second line
	% awk -f t u this=that
	BEGIN: 
	INPUT:  first line
	INPUT:  second line
	END: that
	% awk -f t this=that u
	BEGIN:
	INPUT: that first line
	INPUT: that second line
	END: that
	% rm t u

The `BEGIN' statement is done before any `files' are opened; the `END'
statement is done after all `files' have been read.  Any `files' of
the form `a=b' set variable `a' to value `b'.

All of the above is with respect to the 4.3BSD flavour of `awk'.  The
new awk (as described in the awk book) appears to open the first `file'
before executing the BEGIN statement, so that any assignments that
appear before the first real file happen before the BEGIN.  What GNU
awk does, I do not know (but the above technique will tell you).
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris

-----------------------------

From: "Jonathan I. Kamens" <jik at athena.mit.edu>
Subject: Re: Import variables in to awk.
Date: 15 Nov 89 18:19:52 GMT
Sender: daemon at bloom-beacon.mit.edu
To:       info-unix at sem.brl.mil

In article <20774 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
>...
>The `BEGIN' statement is done before any `files' are opened; the `END'
>statement is done after all `files' have been read.  Any `files' of
>the form `a=b' set variable `a' to value `b'.

  Nifty!  Two questions:

1. Why isn't this mentioned in the BSD man page awk(1), or in the
   /usr/doc documentation about awk?
2. What happens if you actually want to read in a file that has = in
   the filename?  How am I supposed to know what happens if the
   feature isn't mentioned in documentation? :-)

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710

-----------------------------

From: David C Lawrence <tale at pawl.rpi.edu>
Subject: Re: Import variables in to awk.
Date: 15 Nov 89 23:55:18 GMT
To:       info-unix at sem.brl.mil

In <10531 at thorin.cs.unc.edu> warner at unc.cs.unc.edu (Byron Warner) writes:
Byron>  [file foo]
Byron> { print import,$0 }
Byron>  [command]
Byron> awk -F: -f foo /etc/passwd import='hello
Byron> why do I get just a list of logins?

Because the variable assignment has to come before file name.  I'm
also assuming here that the ' is a typo, or the absence of a match is;
either way variable assignment comes before the file list.  If you
change it to "awk -F: -f foo import=hello /etc/passwd" it will work.

This applies to V7 awk, nawk and gawk.

In <20774 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
Chris> All of the above is with respect to the 4.3BSD flavour of `awk'.  The
Chris> new awk (as described in the awk book) appears to open the first `file'
Chris> before executing the BEGIN statement, so that any assignments that
Chris> appear before the first real file happen before the BEGIN.  What GNU
Chris> awk does, I do not know (but the above technique will tell you).

Variables set as above are not available in the BEGIN block with gawk,
but a special option, -v, is provided to do this.  -v VAR=VAL will
assign VAL to VAR before script execution begins; another -v must be
specified for each variable you want to declare this way.

Dave
-- 
 (setq mail '("tale at pawl.rpi.edu" "tale at ai.mit.edu" "tale at rpitsmts.bitnet"))

-----------------------------

From: David C Lawrence <tale at pawl.rpi.edu>
Subject: Re: Import variables in to awk.
Date: 16 Nov 89 00:06:16 GMT
To:       info-unix at sem.brl.mil

In <15924 at bloom-beacon.MIT.EDU> jik at athena.mit.edu (Jonathan I. Kamens) writes:

Jon> 1. Why isn't this mentioned in the BSD man page awk(1), or in the
Jon>    /usr/doc documentation about awk?

Oversight, I suppose.  SunOS manual page has it.

Jon> 2. What happens if you actually want to read in a file that has = in
Jon>    the filename?  How am I supposed to know what happens if the
Jon>    feature isn't mentioned in documentation? :-)

Good question.  I just tried a few different things which I thought
might work and none of them did.  It appears as though .*=.* patterns
which appear after a file name (/dev/null in my test case) are simply
ignored; they are neither interpreted as variable assigments nor as
file names.  I also tried passing it an arg of foo\=bar (my test case)
and it still did nothing.  In fact, it didn't even read stdin.  Hmm ...

Dave
-- 
 (setq mail '("tale at pawl.rpi.edu" "tale at ai.mit.edu" "tale at rpitsmts.bitnet"))

-----------------------------

From: Randal Schwartz <merlyn at iwarp.intel.com>
Subject: Re: Import variables in to awk.
Date: 16 Nov 89 01:01:26 GMT
Sender: news at omepd.uucp
To:       info-unix at sem.brl.mil

In article <10531 at thorin.cs.unc.edu>, warner at unc (Byron Warner) writes:
| My questions is how do you import csh variables into an awk script.
| for example if I have a file called foo, which contains:
| {
| 	print import,$0
| }
| 
| and I issue the command 
| awk -F: -f foo /etc/passwd import='hello
                                          ^ missing quote,  perhaps?
| why do I get just a list of logins?

The order of command-line options is significant:

% awk -F: -f foo import='hello' /etc/passwd

yields the result you want.  Also note that these variables are not
available in the "BEGIN" action (unless something happened after the
V7 version of awk).

Just another UNIX old-timer,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/

-----------------------------

From: Francois-Michel Lang <lang at prc.unisys.com>
Subject: Re: Import variables in to awk.
Date: 16 Nov 89 22:36:15 GMT
Sender: news at prc.unisys.com
To:       info-unix at sem.brl.mil

It's time once again to post to this group a document that I have
which explains some important things about (vanilla) AWK
that are not elsewhere documented....

****************************************************************

\" to print this document, do ditroff -ms -Pip2 awk.supp
 .RP
 .TL
 .B
A Supplemental Document For AWK
 .sp
 .R
- or -
 .sp
 .I
Things Al, Pete, And Brian Didn't Mention Much
 .R
 .AU
John W. Pierce
 .AI
Department of Chemistry
University of California, San Diego
La Jolla, California  92093
jwp%chem at sdcsvax.ucsd.edu
 .AB
As
 .B awk
and its documentation are distributed with
 .I
4.2 BSD UNIX*
 .R
there are a number of bugs, undocumented features,
and features that are touched on so briefly in the
documentation that the casual user may
not realize their full significance.  While this document
applies primarily to the \fI4.2 BSD\fR version of \fIUNIX\fR,
it is known that the \fI4.3 BSD\fR version does not have
all of the bugs fixed, and that it does not have updated
documentation.  The situation with respect to the versions
of \fBawk\fR distributed with other versions \fIUNIX\fR and
similar systems is unknown to the author.
 .FS
*UNIX is a trademark of AT&T
 .FE
 .AE
 .LP
In this document references to "the user manual" mean
 .I
Awk - A Pattern Scanning and Processing Language (Second Edition)
 .R
by Aho, Kernighan, and Weinberger.  References to "awk(1)" mean
the entry for
 .B awk
in the
 .I
UNIX Programmer's Manual, 4th Berkeley Distribution.
 .R
References to "the documentation" mean both of those.
 .LP
In most examples, the outermost set of braces ('{ }') have been
ommitted.  They would, of course, be necessary in real scripts.
 .NH
Known Bugs
 .LP
There are three main bugs known to me.  They involve:
 .IP
Assignment to input fields.
 .IP
Piping output to a program from within an \fBawk\fR script.
 .IP
Using '*' in \fIprintf\fR field width and precision specifications
does not work, nor do '\\f' and '\\b' print formfeed and backspace
respectively.
 .NH 2
Assignment to Input Fields
 .LP
[This problem is partially fixed in \fI4.3BSD\fR;
see the last paragraph of this section regarding the unfixed portion.]
 .LP
The user manual states that input fields may be objects of assignment
statements.  Given the input line
 .DS
field_one field_two field_three
 .DE
the script
 .DS
$2 = "new_field_2"
print $0
 .DE
should print
 .DS
field_one new_field_2 field_three
 .DE
 .LP
This does not work; it will print
 .DS
field_one field_two field_three
 .DE
That is, the script will behave as if the
assignment to $2 had not been made.  However,
explicitly referencing an "assigned to" field
 .I does
recognize that the assignment has been made.
If the script
 .DS
$2 = "new_field_2"
print $1, $2, $3
 .DE
is given the same input it will [properly] print
 .DS
field_one new_field_2 field_three
 .DE
Therefore, you can
get around this bug with, e.g.,
 .DS
$2 = "new_field_2"
output = $1                       # Concatenate output fields
for(i = 2; i <= NF; ++i)          # into a single output line
	output = output OFS $i    # with OFS between fields
print output
 .DE
 .LP
In \fI4.3BSD\fR, this bug has been fixed to the extent that
the failing example above works correctly.  However, a script like
 .DS
$2 = "new_field_2"
var = $0
print var
 .DE
still gives incorrect output.  This problem can be bypassed by using
 .DS
\fIvar\fR = sprintf("%s", $0)
 .DE
instead of "\fIvar\fR = $0"; \fIvar\fR will have the correct value.
 .NH 2
Piping Output to a Program
 .LP
[This problem appears to have been fixed in \fI4.3BSD\fR,
but that has not been exhaustively tested.]
 .LP
The user manual states that
 .I print
and
 .I printf
statements may write to a program using, e.g.,
 .DS
print | "\fIcommand\fR"
 .DE
This would pipe the output into \fIcommand\fR, and it
does work.  However, you should be aware that this causes
 .B awk
to spawn a child process (\fIcommand\fR), and that it
 .I
does not
 .R
wait for the child to exit before it exits itself.  In the case of a
"slow" command like
 .B sort,
 .B awk
may exit before
 .I command
has finished.
 .LP
This can cause problems in, for example, a shell script that
depends on everything done by
 .B awk
being finished before the next shell command is executed.
Consider the shell script
 .DS
awk -f awk_script input_file
mv sorted_output somewhere_else
 .DE
and the
 .B awk
script
 .DS
print output_line | "sort -o sorted_output"
 .DE
If
 .I input_file
is large
 .B awk
will exit long before
 .B sort
is finished.  That means that the
 .B mv
command will be executed before
 .B sort
is finished, and the result is unlikely to be what you wanted.
Other than fixing the source, there is no way to avoid this
problem except to handle such pipes outside of the awk script, e.g.
 .DS
awk -f awk_file input_file | sort -o sorted_output
mv sorted_output somewhere_else
 .DE
which is not wholly satisfactory.
 .LP
See
 .I
Sketchily Documented Features
 .R
below for other considerations in redirecting
output from within an
 .B awk
script.
 .NH 2
Printf and '*', '\\f', and '\\b'
 .LP
The document says that the \fIprintf\fR function provided is
identical to the \fIprintf\fR provided by the \fIC\fR language
\fBstdio\fR package.  This is incorrect:  '*' cannot be used to
specify a field width or precision, and '\\f' and '\\b' cannot
be used to print formfeeds and backspaces.
 .LP
The command
 .DS
printf("%*.s", len, string)
 .DE
will cause a core dump.  Given \fBawk\fR's age, it is likely
that its \fIprintf\fR was written well before the use of '*'
for specifying field width and precision appeared in the \fBstdio\fR
library's \fIprintf\fR.  Another possibility is that it wasn't
implemented because it isn't really needed to achieve the same effect.
 .LP
To accomplish this effect, you can utilize the fact that \fBawk\fR
concatenates variables before it does any other processing on them.
For example, assume a script has two variables \fIwid\fR and
\fIprec\fR which control the width and precision used for printing
another variable \fIval\fI:
 .DS
[code to set "wid", "prec", and "val"]

printf("%" wid "." prec "d\en", val)
 .DE
If, for example, \fIwid\fR is 8 and \fIprec\fR is 3, then /fBawk\fR
will concatenate everything to the left of the comma in
the \fIprintf\fR statement, and the statement will really be
 .DS
printf(%8.3d\en, val)
 .DE
These could, of course, been assigned to some variable \fIfmt\fR before
being used:
 .DS
fmt = "%" wid "." prec "d"

printf(fmt "\en", val)
 .DE
Note, however, that the newline ("\en") in the second form \fIcannot\fR
be included in the assignment to \fIfmt\fR.
 .LP
To allow use of '\\f' and '\\b', \fBawk\fR's \fIlex\fR script must
be changed.  This is trivial to do (it is done at the point
where '\\n' and '\\t' are processed), but requires having source
code.  [I have fixed this and have not seen any unwanted effects.]
# .bp
 .NH
Undocumented Features
 .LP
There are several undocumented features:
 .IP
Variable values may be established on the command line.
 .IP
A
 .B getline
function exists that reads the next input line and starts processing it
immediately.
 .IP
Regular expressions accept octal representations of characters.
 .IP
A
 .B -d
flag argument produces debugging output if
 .B awk
was compiled with "DEBUG" defined.
 .IP
Scripts may be "compiled" and run later (providing the installer
did what is necessary to make this work).
 .NH 2
Defining Variables On The Command Line
 .LP
To pass variable values into a script at run time, you may use
 .IP
 .I variable=value
 .LP
(as many as you like) between any "\fB-f \fIscriptname\fR" or
 .I program
and the names of any files to be processed.  For example,
 .DS
awk -f awkscript today=\e"`date`\e" infile
 .DE
would establish for
 .I awkscript
a variable named
 .B today
that had as its value the output of the
 .B date
command.
 .LP
There are a number of caveats:
 .IP
Such assignments may appear only between
 .B -f
 .I awkscript
(or \fIprogram\fR or [see below] \fB-R\fIawk.out\fR)
and the name of any
input file (or '-').
 .IP
Each
 .I variable=value
combination must be a single argument (i.e. there must not be spaces
around the '=' sign);
 .I value
may be either a numeric value or a string.  If it is a string,
it must be enclosed in
double quotes at the time \fBawk\fR reads the argument.  That means
that the double quotes enclosing \fIvalue\fR on the command line
must be protected from the shell as in the example above or it will
remove them.
 .IP
 .I Variable
is not available for use within the script until after the first record
has been read and parsed, but it is available as soon as
that has occurred so that it may be used before any other
processing begins.  It does not exist at the time the
 .B BEGIN
block is executed, and if there was no input it will not exist in the
 .B END
block (if any).
 .NH 2
Getline Function
 .LP
 .B Getline
immediately reads the next input line (which is parsed into \fI$1\fR,
\fI$2\fR, etc) and starts processing it at the location of the call
(as opposed to
 .B next
which immediately reads the next input line but starts processing
from the start of the script).
 .LP
 .B Getline
facilitates performing some types of tasks such as
processing files with multiline records and merging
information from several files.  To use the latter as an example,
consider a case where two files, whose lines do not share
a common format, must be processed together.  Shell and \fBawk\fR
scripts to do this might look something like
 .sp
In the shell script
 .DS
( echo DATA1; cat datafile1; echo ENDdata1 \e
  echo DATA2; cat datafile2; echo ENDdata2 \e
) | \e
    awk -f awkscript - > awk_output_file
 .DE
In the
 .B awk
script
 .DS
/^DATA1/  {       # Next input line starts datafile1
          while (getline && $1 !~ /^ENDdata1$/)
                 {
                 [processing for \fIdata1\fR lines]
                 }
          }
 .sp 1
/^DATA2/  {       # Next input line starts datafile2
          while (getline && $1 !~ /^ENDdata2$/)
                 {
                 [processing for \fIdata2\fR lines]
                 }
          }
 .DE
There are, of course, other ways of accomplishing this particular task
(primarily using \fBsed\fR to preprocess the information),
but they are generally more difficult to write and more
subject to logic errors.  Many cases arising in practice
are significantly more difficult, if not impossible, to handle
without \fBgetline\fR.
 .NH 2
Regular Expressions
 .LP
The sequence "\fI\eddd\fR" (where 'd' is a digit)
may be used to include explicit octal
values in regular expressions.  This is often useful if "nonprinting"
characters have been used as "markers" in a file.  It has not been
tested for ASCII values outside the range 01 through 0127.
 .NH 2
Debugging output
 .LP
[This is unlikely to be of interest to the casual user.]
 .sp
If \fBawk\fR was compiled with "DEBUG" defined, then giving it a
 .B -d
flag argument will cause it to produce debugging output when it is run.
This is sometimes useful in finding obscure problems in scripts, though
it is primarily intended for tracking down problems with \fBawk\fR itself.
 .NH 2
Script "Compilation"
 .LP
[It is likely that this does not work at most sites.  If it does not, the
following will probably not be of interest to the casual user.]
 .sp
The command
 .DS
awk -S -f script.awk
 .DE
produces a file named
 .B awk.out.
This is a core image of
 .B awk
after parsing the file
 .I script.awk.
The command
 .DS
awk -Rawk.out datafile
 .DE
causes
 .B awk.out
to be applied to \fIdatafile\fR (or the standard input if no
input file is given).  This avoids having to reparse large
scripts each time they are used.  Unfortunately, the way this
is implemented requires some special action on the part of the
person installing \fBawk\fR.
 .LP
As \fBawk\fR is delivered with \fI4.2 BSD\fR (and \fI4.3 BSD\fR),
 .I awk.out
is created by the \fBawk -S ...\fR process by calling
 .B sbrk()
with '0', writing out the returned value, then
writing out the core image from location 0 to
the returned address.  The \fBawk -R...\fR process
reads the first word of
 .I awk.out
to get the length of the image, calls
 .B brk()
with that length, and
then reads the image into itself starting at location 0.
For this to work, \fBawk\fR must have been loaded with its
text segment writeable.  Unfortunately,
the \fIBSD\fR default for \fBld\fR is to load with the text
read-only and shareable.  Thus, the installer must remember to take
special action (e.g. "cc -N ..."
[equivalently "ld -N ..."] for \fI4BSD\fR) if these
flags are to work.
 .LP
[Personally, I don't think it is
a very good idea to give \fBawk\fR the opportunity
to write on its text segment; I changed it so that
only the data segment is overwritten.]
 .LP
Also, due to what appears to be a lapse in logic, the first
non-flag argument following \fB-R\fIawk.out\fR is discarded.
[Disliking that behavior, the I changed it so that the \fB-R\fR flag
is treated like the \fB-f\fR flag:  no flag arguments may follow it.]
# .bp
 .NH
Sketchily Documented Features
 .LP
 .NH 2
Exit
 .LP
The user manual says that using the
 .B exit
function causes the script to behave as if end-of-input has been reached.
Not menitoned explicitly is the fact that this will cause the
 .B END
block to be executed if it exists.
Also, two things are ommitted:
 .IP
\fBexit(\fIexpr\fB)\fR causes the script's exit status to be
set to the value of \fIexpr\fR.
 .IP
If
 .B exit
is called within the
 .B END
block, the script exits immediately.
 .NH 2
Mathematical Functions
 .LP
The following builtin functions exist and are mentioned in
 .I awk(1)
but not in the user manual.
 .IP \fBint(\fIx\fB)\fR 10
\fIx\fR trunctated to an integer.
 .IP \fBsqrt(\fIx\fB)\fR 10
the square root of \fIx\fR for \fIx\fR >= 0, otherwise zero.
 .IP \fBexp(\fIx\fB)\fR 10
\fBe\fR-to-the-\fIx\fR for -88 <= \fIx\fR <= 88, zero
for \fIx\fR < -88, and dumps core for \fIx\fR > 88.
 .IP \fBlog(\fIx\fB)\fR 10
the natural log of \fIx\fR.
 .NH 2
OFMT Variable
 .LP
The variable
 .B OFMT
may be set to, e.g. "%.2f", and purely numerical output will be
bound by that restriction in
 .B print
statements.  The default value is "%.6g".  Again, this is mentioned in
 .I awk(1)
but not in the user manual.
 .NH 2
Array Elements
 .LP
The user manual states that "Array elements ... spring into existence by
being mentioned."  This is literally true;
 .I any
reference to an array element causes it to exist.
("I was thought about, therefore I am.")
Take, for example,
 .DS
if(array[$1] == "blah")
	{
	[process blah lines]
	}
 .DE
If there is not an existing element of
 .B array
whose subscript is the same as the contents of the
current line's first field,
 .I
one is created
 .R
and its value (null, of course) is then compared
with "blah".  This can be a bit
disconcerting, particularly when later processing is using
 .DS
for (i in \fBarray\fR)
        {
        [do something with result of processing
	"blah" lines]
        }
 .DE
to walk the array and expects all the elements to be non-null.
Succinct practical examples are difficult to construct, but
when this happens in a 500 line
script it can be difficult to determine what has gone wrong.
 .NH 2
FS and Input Fields
 .LP
By default any number of spaces or tabs can separate fields (i.e.
there are no null input fields) and trailing spaces and tabs
are ignored.  However, if
 .B FS
is explicitly set to any character other than a space
(e.g., a tab: \fBFS = "\et"\fR), then a field is defined
by each such character and trailing field separator characters are
not ignored.  For example, if '>' represents a tab then
 .DS
one>>three>>five>
 .DE
defines six fields, with fields two, four, and six being empty.
 .LP
If
 .B FS
is explicitly set to a space (\fBFS\fR = "\ "), then
the default behavior obtains (this may be a bug); that
is, both spaces
and tabs are taken as field separators, there can be no
null input fields, and trailing spaces and tabs are ignored.
 .NH 2
RS and Input Records
 .LP
If
 .B RS
is explicitly set to the null string (\fBRS\fR = ""), then the input
record separator becomes a blank line, and the newlines at the end
of input lines is a field separator.  This facilitates
handling multiline records.
 .NH 2
"Fall Through"
 .LP
This is mentioned in the user manual, but it is important
enough that it is worth pointing out here, also.
 .LP
In the script
 .DS
/\fIpattern_1\fR/  {
             [do something]
             }
 .sp
/\fIpattern_2\fR/  {
             [do something]
             }
 .DE
all input lines will be compared with both 
 .I pattern_1
and
 .I pattern_2
unless the
 .B next
function is used before the closing '}' in the
 .I pattern_1
portion.
 .NH 2
Output Redirection
 .LP
Once a file (or pipe) is opened by
 .B awk
it is not closed until
 .B awk
exits.  This can occassionally cause problems.  For example,
it means that a script that sorts its input lines into
output files named by the contents of their first fields
(similar to an example in the user manual)
 .DS
{ print $0 > $1 }
 .DE
is going to fail if the number of different first fields exceeds
about 10.
This problem
 .I cannot
be avoided by using something like
 .DS
{
command = "cat >> " $1
print $0 | command
}
 .DE
as the value of the variable
 .B command
is different for each different value of
 .I $1
and is therefore treated as a different output "file".
 .LP
[I have not been able to create a truly satisfactory
fix for this that doesn't involve having \fBawk\fR treat output
redirection to pipes differently from output to files; I
would greatly appreciate hearing of one.]
 .NH 2
Field and Variable Types, Values, and Comparisons
 .LP
The following is a synopsis of notes included with \fBawk\fR's
source code.
 .NH 3
Types
 .LP
Variables and fields can be strings or numbers or both.
 .NH 4
Variable Types
 .LP
When a variable is set by the assignment
 .DS
\fIvar\fR = \fIexpr\fR
 .DE
its type is set to the type of
 .I expr
(this includes +=, ++, etc). An arithmetic
expression is of type
 .I number,
a concatenation is of type
 .I string,
etc.
If the assignment is a simple copy, e.g.
 .DS
\fIvar1\fR = \fIvar2\fR
 .DE
then the type of
 .I var1
becomes that of
 .I var2.
 .LP
Type is determined by context; rarely, but always very inconveniently,
this context-determined type is incorrect.  As mentioned in
 .I awk(1)
the type of an expression can be coerced to that desired.  E.g.
 .DS
{
\fIexpr1\fR + 0
 .sp 1
\fIexpr2\fR ""    # Concatenate with a null string
}
 .DE
coerces
 .I expr1
to numeric type and
 .I expr2
to string type.
 .NH 4
Field Types
 .LP
As with variables, the type of a field is determined by
context when possible, e.g.
 .RS
 .IP $1++ 8
clearly implies that \fI$1\fR is to be numeric, and
 .IP $1\ =\ $1\ ","\ $2 16
implies that $1 and $2 are both to be strings.
 .RE
 .LP
Coercion is done as needed.
In contexts where types cannot be reliably determined, e.g.,
 .DS
if($1 == $2) ...
 .DE
the type of each field is determined on input by inspection.  All fields are
strings; in addition, each field that contains only a number
is also considered numeric.  Thus, the test
 .DS
if($1 == $2) ...
 .DE
will succeed on the inputs
 .DS
0       0.0
100     1e2
+100    100
1e-3    1e-3
 .DE
and fail on the inputs
 .DS
(null)      0
(null)      0.0
2E-518      6E-427
 .DE
"only a number" in this case means matching the regular expression
 .DS
^[+-]?[0-9]*\e.?[0-9]+(e[+-]?[0-9]+)?$
 .DE
 .NH 3
Values
 .LP
Uninitialized variables have the numeric value 0 and the string value "".
Therefore, if \fIx\fR is uninitialized,
 .DS
if(x) ...
if (x == "0") ...
 .DE
are false, and
 .DS
if(!x) ...
if(x == 0) ...
if(x == "") ...
 .DE
are true.
 .LP
Fields which are explicitly null have the string value "", and are not numeric.
Non-existent fields (i.e., fields past \fBNF\fR) are also treated this way.
 .NH 3
Types of Comparisons
 .LP
If both operands are numeric, the comparison is made
numerically.  Otherwise, operands are coerced to type
string if necessary, and the comparison is made on strings.
 .NH 3
Array Elements
 .LP
Array elements created by
 .B split
are treated in the same way as fields.
 ----------------------------------------------------------------------------
Francois-Michel Lang
Paoli Research Center, Unisys         lang at prc.unisys.com      (215) 648-7256
Dept of Comp & Info Science, U of PA  lang at linc.cis.upenn.edu  (215) 898-9511

-----------------------------

From: "Arnold D. Robbins {EUCC}" <arnold at mathcs.emory.edu>
Subject: Re: Import variables in to awk.
Date: 17 Nov 89 00:00:53 GMT
To:       info-unix at sem.brl.mil

OK. Hopefully this is the definitive word on how things work.

V7 awk (old awk, /usr/bin/awk on Suns and other 4.3 based machines)

	awk '....' a=1 b=2 file c=3 file

	a is set to 1, b to 2, then the files are read and no more
	assignments are done.  This feature was undocumented On my Sun,
	the value of a and b are NOT available in the BEGIN block.
	After the first file is read c gets set to 3. Then the next
	one is read.

S5R3.n, n >= 1 nawk (new awk)

	awk '....' a=1 b=2 file c=3 file

	a is set to 1, b to 2, and those values ARE available in the
	BEGIN block.  Then the first file is read, then c is set to 3,
	then the second file is read. The value of c is NOT set in the
	BEGIN block.

	There are inconsistencies here, since conceptually the assignments
	are done when it goes to do a file open, and it "notices" that it's
	really a variable assignment.  But a and b are assigned before
	any program execution begins, while files aren't opened until
	after the BEGIN block has been run.  Note that the assignment of
	c is done correctly, after the BEGIN block.

GNU Awk 2.11 and S5R4 nawk

	awk -v z=26 '....' a=1 b=2 file c=3 file

	z is set to 26 before the BEGIN block is executed.  Then
	the BEGIN block is run. a is set to 1, b to 2, the first file
	is opened and processed, then c is set to 3, and then the
	second file is processed.

Unfortunately, people had come to rely on the way nawk did assignments
before the BEGIN block was run.  But yet the behavior was inconsistent.
So, to have our cake and eat it too, ALL assignments that are where
file names are supposed to be are done after the BEGIN block.  But,
to make a variable be available in the BEGIN block, the new -v option
was added.  You must supply a -v option for each variable to be assigned.

It is important to note that normal assignments are done AT THE TIME they
would have been opened as a file; don't expect c to be set while the
first file is being processed.

This is something that took some discussion and hammering out between
the GNU people (me and David Trueman), Brian Kernighan at Bell Labs
(and Al Aho through him), and Randall Howard at MKS.

In fact, when Brian first changed his awk to be consistent he got the loudest
complaints about needing variable assignments to happen before the BEGIN 
block was run (Hi Tom!).  Adding a command line option was the best compromise
we could come up with -- the text of the awk program does not change,
just the command line to invoke it, and everyone felt that while it
wasn't particularly pretty, we could all live with it.

(I mentioned the S5R4 awk above; I can't promise this, but I do know that
Brian has made his version of awk, which works as described above, available
to them for inclusion is S5R4.  Perhaps someone doing S5R4 at AT&T can
let us know if it made it in.  He also should have gotten his version
to the toolchest, but I don't know about that for sure either.)

GNU Awk 2.11.1 (version 2.11 at patchlevel 1) has been sent to
comp.sources.unix and should be appearing there shortly. Some version
of gnu awk will be in 4.4 BSD, when that comes out.

***

There is the separate question, "what if I have a filename with an `=' in it?"
The short answer is "don't do that".  It should perhaps be possible to come
up with a simple and consistent rule.  I don't know what that rule is
right now though, since we haven't given it a lot of thought yet.  But
I suspect you can look for a change in gawk 2.12 to address this.

Any more questions, class? :-)
-- 
Arnold Robbins -- guest account at Emory Math/CS	| Laundry increases
DOMAIN: arnold at emory.mathcs.emory.edu			| exponentially in the
UUCP: gatech!emory!arnold  PHONE: +1 404 636-7221	| number of children.
BITNET: arnold at emory	   				| -- Miriam Hartholz

-----------------------------

From: "Ronald K. Wright" <rwright at novavax.uucp>
Subject: spell..adding new words
Date: 15 Nov 89 10:42:39 GMT
Keywords: spell spellin hashcheck RTFM
To:       info-unix at sem.brl.mil

Perhaps excesses as a youth dithered my brain; but all of TFM's that I
have read do not explain how to add words to spell's idea of correct
words.

Spell even in its most primative form would be helpful to me if I
could get it to expand its vocabulary.  

Perhaps someone could explain it to me, try to use simplistic terms.  ;-)
-- 
R. K. Wright MD JD                     | office: medexam!rkw
Chief Medical Examiner, Broward County | nova:   novavax!rwright
Associate Professor Pathology          | home:   medexam!love1!rkw
University of Miami School of Medicine | fax:    305 765 5193

-----------------------------

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: spell..adding new words
Date: 16 Nov 89 00:03:25 GMT
Keywords: spell spellin hashcheck RTFM
To:       info-unix at sem.brl.mil

In article <1628 at novavax.UUCP> rwright at novavax.UUCP (Ronald K. Wright) writes:
>Perhaps excesses as a youth dithered my brain; but all of TFM's that I
>have read do not explain how to add words to spell's idea of correct
>words.

System V flavors of "spell" support local word lists; RTFM again.
For older flavors, you may have to add the words to the "local"
file found in the source directory for the "spell" utility and
perform a "make install" (which will run "spellin" and copy the
resulting hash list file to the needed place).

>Spell even in its most primative form would be helpful to me if I
>could get it to expand its vocabulary.  

What do monkeys have to do with this?

>Perhaps someone could explain it to me, try to use simplistic terms.  ;-)

Basically, either use System V "spell" or give your word list to
your system administrator and ask that he add them to the supported
word list for "spell".

-----------------------------

From: John B Scalia <jb at aablue.uucp>
Subject: ESIX has a bug.
Date: 15 Nov 89 14:02:46 GMT
Followup-To: comp.unix.i386
Keywords: TCP/IP HDB bug
To:       info-unix at sem.brl.mil

Hello, a short while ago a posted about a problem I had encountered with
ESIX's HDB uucp after I loaded its TCP/IP software. Thanks to all those
who responded and made suggestions. Yesterday, the ESIX tech folks did
respond about this problem. (Yeah!) They had confirmed that I wasn't 
imagining the problem and that there is something happening with either
sendmail or rwho under TCP/IP, ie. a bug. Apparently, now that they know
about it, they've said they'll try to get it fixed.

In case others might be considering ESIX, the problem caused HDB i/o to
drop by a factor 8 when TCP/IP was loaded. HDB did NOT fail altogether!
Running Uutry with -x = 9 show that packets were either getting corrupted or
not being acknowledged after receipt. Removing TCP/IP and making no
other changes, either hardware or software, made the problem disappear.
BTW, the problem was much more aggravated when ESIX was receiving.

All in all, I'd still recommend ESIX. The technician I spoke with said
that it did take a little while to duplicate the problem I had and then
figure out why it was occuring. (BTW, they DO have net access, but it
seems that they mostly lurk silently, ie. they still prefer voice calls.)

jb at aablue
-- 
A A Blueprint Co., Inc. - Akron, Ohio +1 216 794-8803 voice
UUCP:	   {uunet!}aablue!jb	(John B. Scalia)

Just a little more nonsense to clutter up the net.

-----------------------------

From: "Susanne W. Smith" <sws at calvin.wa.com>
Subject: Calendar of UNIX-related Events
Date: 15 Nov 89 16:36:49 GMT
Expires: 1 Dec 89 21:45:37 GMT
Sender: std-unix at longway.tic.com
Approved: jsq at longway.tic.com (Moderator, John S. Quarterman)
To:       info-unix at sem.brl.mil

From: sws at calvin.wa.com (Susanne W. Smith)

This is a combined calendar of planned conferences, workshops, or standards
meetings related to the UNIX operating system.  Most of this information
came from the various conference organizers, although some was taken from
;login: (USENIX), 14, 4, Sep/Oct 1989, CommUNIXations (/usr/group), IX, 4,
Sep/Oct 1989, and the /usr/group UNIX Resources Guide.

If your favorite meeting is not listed, it's probably because I don't know
about it.  If you send me information on it, I will probably list it both
here and in the appropriate one of the companion articles:
        Access to UNIX User Groups
        Access to UNIX-Related Publications
        Access to UNIX-Related Standards

Changes since last posting: JUS, /usr/group/cdn, DECUS, IEEE 1003, UKUUG,
                            NLUUG, AUUG, USENIX, Using

Abbreviations:
          APP   Application Portability Profile
            C   Conference or Center
           CC   Computer Communication
        CT&LA   Conformance Testing & Laboratory Accreditation
        G, MD   Gaithersburg, Maryland
            S   Symposium
            T   Tradeshow
            U   UNIX
           UG   User Group
            W   Workshop

USENIX, UniForum, EUUG, AUUG, and DECUS sponsor conferences of the same
names.

UNIX is a Registered Trademark of AT&T Bell Laboratories.

TIC <jsq at longway.tic.com>                    Windsound <sws at calvin.wa.com>

89/11/15 pg. 2        Calendar of UNIX-Related Events         comp.std.unix

year mon days     conference           (sponsor,) (hotel,) location

1989 Nov 1-3      UNIX EXPO            Javits Conv. C, New York, NY
1989 Nov 6-10     DECUS S              Anaheim, California
1989 Nov 9        NLUUG                De Reehorst, Ede, The Netherlands
1989 Nov 9-10     14th JUS UNIX S      Osaka, Japan
1989 Nov 15       POSIX APP W          NIST, G, MD
1989 Nov 16-17    Graphics Workshop V  USENIX, Monterey, CA
1989 Nov 24       AFUU C               Paris, France
1989 Dec 5-6      JUS UNIX Fair '89    JUS, Tokyo, Japan
1989 Dec 6-8      Sun UG C             Hilton, Anaheim, CA
1989 Dec 8-9      UNIX Asia'89 C       Sinix, World Trade Center, Singapore
1989 Dec 11-15    OSI Implementors W   NIST, G, MD
1989 Dec 11-13    UKUUG C              Cardiff, Wales, UK

1990 Jan 8-12     IEEE 1003               New Orleans, LA
1990 Jan 9-10     U in Gov. C&T           Ottawa, ON
1990 Jan 20-26    DECUS S                 Toronto, Canada
1990 Jan 22-26    USENIX                  Omni Shoreham, Washington, DC
1990 Jan 23-26    UniForum                Washington Hilton, Washington, DC
1990 Feb 6-9      IETF                    IAB, FSU, Talahassee, FL
1990 Feb 14       Sys Admin W             UKUUG, Inst of Education, London, UK
1990 Mar 5-6      X3J11                   New York City, NY
1990 Mar 26-28    USING C                 Dallas, Texas, USA
1990 Mar 26-29    DECUS S                 Vasteras, Sweden
1990 Mar 27-30    AFUU C                  Paris, France
1989 Apr 9        POSIX APP W             NIST, G, MD
1990 Apr 9-11     USENIX C++ C            San Francisco, CA
1990 Apr 23-27    EUUG                    Munich, Germany
1990 Apr 23-27    IEEE 1003               Salt Lake City, UT
1990 May 1-4      IETF                    IAB, Pittsburgh Supercomputer C, PA
1990 May 7-11     DECUS S                 New Orleans, LA
1990 May 17       U & Parallel Systems C  NLUUG, Ede, Netherlands
1990 May 30-Jun 1 UNIX/90 C&T             /usr/group/cdn, Toronto, ON
1990 Jun 11-15    USENIX                  Marriott, Anaheim, CA
1990 Jul 9-11     15th JUS S              JUS, Tokyo, Japan
1990 Jul 9-13     UKUUG C                 London,UK
1990 Jul 16-20    IEEE 1003               Danvers, MA
1990 Jul 31-Aug 3 IETF                    IAB, UW, Seattle, WA
1990 Sep 25-28    AUUG C                  Southern Cross, Melbourne, Australia
1990 Oct 22-26    EUUG                    Nice, France
1990 Oct 31-Nov 2 UNIX EXPO               New York, NY
1990 Nov 5-9      10th Internat'l C on CC ICCC, New Delhi, India
1990 Nov 8        Open Systems C          NLUUG, Ede, Netherlands
1990 Nov 15       POSIX APP W             NIST, G, MD
1990 Nov 15-16    16th JUS S              JUS, Osaka, Japan
1990 Dec 4-5      JUS UNIX Fair '90       JUS, Tokyo, Japan
1990 Dec 10-14    DECUS S                 Las Vegas, NV

TIC <jsq at longway.tic.com>                    Windsound <sws at calvin.wa.com>

89/11/15 pg. 3        Calendar of UNIX-Related Events         comp.std.unix

1991 Jan 21-25 USENIX               Dallas, TX
1991 Jan 22-25 UniForum             Infomart, Dallas, TX
1991 Feb       U in Gov. C&T        Ottawa, ON
1991 Feb 18-22 DECUS S              Ottawa, Canada
1991 May 20-24 EUUG                 Tromso, Norway
1991 May       U 9x/etc C&T         Toronto, ON
1991 May 6-10  DECUS S              Atlanta, GA
1991 Jun 10-14 USENIX               Opryland, Nashville, TN
1991 Sep 16-20 EUUG                 Budapest, Hungary
1991 Dec 9-13  DECUS S              Anaheim, CA

1992 Jan 20-24    USENIX               Hilton Square, San Francisco, CA
1992 Jan 21-24    UniForum             Moscone Center, San Francisco, CA
1992 Spring       EUUG                 Jersey, U.K.
1992 May 4-8      DECUS S              Atlanta, GA
1992 Jun 8-12     USENIX               Marriott, San Antonio, TX
1992 Autumn       EUUG                 Amsterdam, Netherlands

1993 Jan          USENIX               Town & Country, San Diego, CA
1993 Mar 2-4      UniForum             Washington, D.C.
1993 Jun 21-25    USENIX               Cincinnati, OH

TIC <jsq at longway.tic.com>                    Windsound <sws at calvin.wa.com>


Volume-Number: Volume 17, Number 56

-----------------------------

From: Maarten Litmaath <maart at cs.vu.nl>
Subject: -msU troff package sought for vi tutorial (was: vi (vs VMS/EDT))
Date: 15 Nov 89 18:20:15 GMT
Keywords: DEC bashing
To:       info-unix at sem.brl.mil

In article <1989Nov14.223604.17418 at cs.eur.nl> henk at cs.eur.nl (Henk Langeveld) writes:
\...
\Perhaps we could use a vi tutorial, to get people acquainted with
\the basics of vi.  Anybody?  Maarten?

How about the vi tutorial that comes with 4.x BSD in /usr/doc/usd?
I have dug it up, but I can't find this -msU troff macro package.
It's *almost* -ms.
Anybody?
-- 
[...] like a roving gang.  "Ah, here's a NEW almost-empty group to post train
schedules and core dumps in!"  (Joe Buck) | maart at cs.vu.nl, mcsun!botter!maart

-----------------------------

From: P E Smee <exspes at gdr.bath.ac.uk>
Subject: Re: What shell do you use? (Poll)
Date: 15 Nov 89 18:49:42 GMT
To:       info-unix at sem.brl.mil

In article <2450 at csun.edu> cacsc243 at mx.csun.edu () writes:
>
>I am curious as to which shells people use, and which they've tried.

csh as my interactive shell, because I particularly want 'history',
'noclobber', and 'ignoreeof', because I prefer alias to 'export'ing
functions, and because I find the csh style for 'control' commands
(foreach, while, ...) fits my mindset better and so I can usually
remember them without looking in TFM.

sh (vanilla Bourne) for writing shell scripts for my lib, because they
go faster.

-- 
 Paul Smee               |    JANET: Smee at uk.ac.bristol
 Computer Centre         |   BITNET: Smee%uk.ac.bristol at ukacrl.bitnet
 University of Bristol   | Internet: Smee%uk.ac.bristol at nsfnet-relay.ac.uk
 (Phone: +44 272 303132) |     UUCP: ...!uunet!ukc!gdr.bath.ac.uk!exspes

-----------------------------

From: Jeff Medcalf <jeffm at uokmax.ecn.uoknor.edu>
Subject: Re: What shell do you use? (Poll)
Date: 17 Nov 89 01:04:12 GMT
To:       info-unix at sem.brl.mil


I am currently using tcsh.  I began on csh, and have used ksh.  I tried
vsh, but didn't like it.  Bourne shell for programs like my remove to 
a tmp directory.

SHELL		OPINIONS

sh		great for command programming (fast)
		not fully featured enough for general use, though

ksh		ksh and I just didn't get along.  It was a hassle
		for me to learn

csh		the shell I started on, and was very familiar with.
		I like the control structures, alias, pushd/popd, and
		the history mechanism.  makes it easy to work on the
		system

tcsh		csh++.  csh with command line editing, filename completion,
		and some other little goodies.  only problem is that it is
		not quite working right with our beta-test UMAX4.3.


-- 
Jeff Medcalf	 jeffm at uokmax.uucp	jeffm at uokmax.ecn.uoknor.edu
!chinet!uokmax!jeffm	jeffm at invent_an_address (as reliable as the preceeding)
In 1869, the waffle iron was invented, thus solving the annoying tendency of
waffles to wrinkle in the dryer.

-----------------------------

From: neese at adaptex.uucp
Subject: Re: What is a good SCSI controller?
Date: 15 Nov 89 19:38:00 GMT
Nf-ID: #R:dynasys.UUCP:20:adaptex:6900005:000:906
Nf-From: adaptex.UUCP!neese    Nov 15 13:38:00 1989
To:       info-unix at sem.brl.mil


>I'm thinking about purchasing a Seagate ST-296N and I would like to know what
>a good SCSI controller would be.  I am running an Everex 386/16 and would like
>this to be compatible with SCO Xenix and AT+T Unix.  I  would also like the
>ability to add an SCSI tape drive in the future and perhaps another SCSI hard
>drive as well (2 hard drives AND a tape drive).  Can anyone give me any        
>pointers here?

The AHA-1540A/1542A host adapters are supported in SCO's releases (2.3GT and
UNIX).  You can add up to 3 more hard drives and 3 tape drives if you like.
I don't know about AT&T UNIX and what they support.  The one thing you better
be aware of:  The Seagate drive is a slow drive.  Performance with this
drive will be worse than a good RLL controller and drive.


			Roy Neese
			Adaptec Central Field Applications Engineer
			UUCP @ {texbell,attctc}!cpe!adaptex!neese
				merch!adaptex!neese

-----------------------------

From: Lyndon Nerenberg <lyndon at cs.athabascau.ca>
Subject: Re: another nice one
Date: 15 Nov 89 20:58:21 GMT
To:       info-unix at sem.brl.mil

In article <20540 at unix.cis.pitt.edu> yahoo at unix.cis.pitt.edu (Kenneth L Moore) writes:
>I can't believe that four lines causes any significant problems.  Does
>anyone know how much is paid to recieve my .sig? .000000001 cents?

Let's work it out. Assuming a connection between us and Edmonton (our
nearest feed) that costs 18 cents per minutes, and a 2400 baud link
, in the perfect case we move 240 characters per second. The cost
for one second of LD is .18 * (1/60) = .3 cents to move those three
lines (yes, I'm ignoring newlines, call setup overhead, etc.).

If there are 5000 sites in the same situation, the sum total cost
of moving those three lines around is 5000 * .3 = 1500 cents = $15.00
for every article you post. Most sites pay less to get news, but
some sites pay more -- *substantially* more. See Brian Reid's postings
for a (slightly) more accurate guess as to the actual number of usenet
sites.

>Also, I don't consider it useless garbage. It allows someone to easily
>identify me. That was its purpose and it seems to serve it pretty well.

Except that it contains no information that's already in the header.
The '@' characters serve no useful purpose, other than to make the
signature more visible. In my case, they just give me a headache. I
think this is what everyone else is really complaining about. There
is NOTHING visually appealing about a bunch of BRIGHT '@' characters
on a dark background (and vice versa).

I tend to judge people by the contents of what they write. If I want
to identify you (say, for a reply message) I'll do it by the headers.
Besides, I don't know if I would want to be identified as a
yahoo@ *anything* :-)

Change the '@' to ' ' or something that doesn't mangle everyones
optic nerve and the bitch rate will drop substantially. Or replace
them with an utterly useless saying (see below for example :-)

-- 
Lyndon Nerenberg  VE6BBM / Computing Services / Athabasca University
  {alberta,decwrl,lsuc}!atha!lyndon || lyndon at cs.AthabascaU.CA

                  The Connector is the Notwork.

-----------------------------

From: Jeffrey Gleixner <glex at uf.msc.umn.edu>
Subject: thanks
Date: 15 Nov 89 22:20:48 GMT
Sender: news at uc.msc.umn.edu
Keywords: thanks
To:       info-unix at sem.brl.mil


	Thanks to all who responded to getting spell to work from vi.  I
	haven't had time to try them all, but it was interesting how
	everyone takes care of this problem.

	-Jeff "maybe I'll just learn how to spell" Gleixner-
	glex at msc.umn.edu
-glex-

-----------------------------

From: Alex Measday <alex at isi.uucp>
Subject: Re: XMODEM transfers while using 'script' (ptys)
Date: 15 Nov 89 22:40:55 GMT
Keywords: pty, script, xmodem, errors
To:       info-unix at sem.brl.mil

In article <229 at tnl.UUCP>, norstar at tnl.UUCP (Daniel Ray) writes:
> 
> Hi. I've noticed that you cannot use 'xmodem' or 'sx' or other XMODEM-type
> file transfers if you are logging a transcript of your session with the
> utility 'script'. 'script' uses pty's...when attempting XMODEM transfers,
> all one gets is errors til XMODEM or the communication program aborts.
> 

I've got a different but seemingly related problem, so I'm interested in
the answer to Daniel Ray's question, too.  My PC XT was connected to our
Sun 3/110 through a serial port.  I was able to transfer files back and
forth at 9600 baud using the YMODEM batch protocol (PROCOMM on the PC and
Steve Grandi's YMODEM program on the Sun); I had no problems.

We recently bought a CMC TranServer terminal server which is connected to
the Sun via Ethernet and our PC's are connected to the terminal server at
9600 baud (8 bits, no parity).  We use TELNET on the terminal server to
open a session on the Sun; the Sun has a PTY on its side.  Everything
works fine (VI, MicroEMACS, etc.) except for file transfers between the
machines.

Transferring files from the Sun to the PC using YMODEM batch works great,
but transferring files from the PC to the Sun does not.  File names are
exchanged, but the Sun's YMODEM program keeps timing out "while reading
sectors 1-8" (from the debug file) and eventually it aborts the transfer.

Our UNIX-based KERMIT program has the same problem: Sun->PC transfers
work fine, but PC->Sun transfers keep timing out.  The transfer continues,
but at a reduced data rate (a few hundred bytes per minute!).

It seems like the problem has to do with PTY's - what should be done?

                                Thanks!

                                Alex Measday
                                Integral Systems, Inc.
                                Lanham, MD

-----------------------------

From: Michael Lodman <jml at tw-rnd.sandiego.ncr.com>
Subject: patch
Date: 15 Nov 89 23:17:15 GMT
To:       info-unix at sem.brl.mil

Could someone please mail me the source to "patch".

Thanks.

-- 
+-----------------------------------------------------------+
| Michael Lodman               Mike.Lodman at SanDiego.NCR.COM |
| NCR Corporation  -  Distributed Systems Lab  -  San Diego |
| 9900 Old Grove Rd.  San Diego, CA.  92131  (619) 693-5353 |
+-----------------------------------------------------------+

-----------------------------

From: Randal Schwartz <merlyn at iwarp.intel.com>
Subject: Re: cc -o *.c
Date: 16 Nov 89 00:49:40 GMT
Sender: news at omepd.uucp
To:       info-unix at sem.brl.mil

In article <20619 at unix.cis.pitt.edu>, cmf at obie (Carl M. Fongheiser) writes:
| In article <1989Nov9.145517.4338 at virtech.uucp> cpcahil at virtech.uucp (Conor P. Cahill) writes:
| ] In article <1042 at root44.co.uk>, gwc at root.co.uk (Geoff Clare) writes:
| ] > In article <20512 at mimsy.umd.edu> chris at mimsy.umd.edu (Chris Torek) writes:
| ] > >
| ] > >	% echo *.c
| ] > >	t.c tet.c t.c
| ] > 
| ] > That's a neat trick, Chris.  Care to tell us how you managed it?
| ] 
| ] easy,
| ] 
| ] 	% cp /dev/null t.c
| ] 	% cp /dev/null tet.c
| ] 	% cp /dev/null "tj\<BACKSPACE>.c "
| ] 	% echo *.c
| ] 	t.c tet.c t.c
| 
| Nah, even easier:
| 
| cp /dev/null 't.c tet.c t.c'
| 
| 			Carl Fongheiser
| 			cmf at unix.cis.pitt.edu

Why get /dev/null involved?  Or even exec a process?

$ >'t.c tet.c t.c'

:-)

OB Perl Reference:

perl -e 'open(STDOUT,">t.c tet.c t.c");'

Just another Perl heckler,
-- 
/== Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ====\
| on contract to Intel's iWarp project, Hillsboro, Oregon, USA, Sol III  |
| merlyn at iwarp.intel.com ...!uunet!iwarp.intel.com!merlyn	         |
\== Cute Quote: "Welcome to Oregon... Home of the California Raisins!" ==/

-----------------------------

From: "Frank Ch. Eigler" <fche at db.toronto.edu>
Subject: MS-DOS BBS programs under 386 UNIXes
Date: 16 Nov 89 01:23:09 GMT
Followup-To: alt.bbs
Keywords: VP/ix, 386 UNIX, MS-DOS, BBS
To:       info-unix at sem.brl.mil


Does anyone have any experience with running MS-DOS BBS programs under
Unix running some DOS emulator?  Are there DOS emulators available for
386 Unix-es other than VP/ix which may be well suited to this?  Any
problems?

As well, how well are these DOS emulators suited to running multiple
copies of MS-DOS [programs] simultaneously.

We are particularly interested in Interactive's 386/ix and VP/ix.

We'd appreciate responses in E-Mail.
-- 
  Frank Ch. Eigler                The Hack BBS - (416)-249-0263 //
                                                               //
  fche at db.toronto.edu                                      \\ //
                                                      AMIGA \X/

-----------------------------

From: Joseph E Poplawski <jpoplaws at telesci.uucp>
Subject: Need help with lload
Date: 16 Nov 89 01:34:39 GMT
To:       info-unix at sem.brl.mil

Hello.

A while back, a program called lload.c was posted to the net.  I finally got
the program compiled but upon execution I get an error.  A script of the
session looks like:

Script started Wed Jul 26 19:42:18 1989

# lload
Could not get address for _v

# exit

Script done Wed Jul 26 19:44:31 1989

Anyone have any ideas?

-Jo
--
Joseph E Poplawski (Jo)
Home:  5 Sussex Drive, Willingboro, NJ  08046-1407    Phone:  +1 609 835-2846
UUCP:  ...{rutgers!rochester!moscom,princeton,pyrnj}!telesci!fantasci!jep

-----------------------------

From: Cathy Benney <cathy at ncelvax.uucp>
Subject: tr
Date: 16 Nov 89 05:28:56 GMT
Keywords: tr ascii
To:       info-unix at sem.brl.mil

Hello.  I have been experimenting with "tr", the translate characters command.  I am curious to know if tr can substitute from a single character in string 1 
to multiple characters in string 2.  For example, could "tr" substitute
'\012' (the ascii new line) for '\015\012' (which would be ^M^J).  I have been 
trying this, using a command like: 
    tr '\012' '\015\012' < file.1 > file.2 
but without any luck.  In the command above, tr substitutes ascii 012 for 
ascii 015.  What I would like is for tr to substitute every 012 with an
012 015.  I am a novice in using tr (could you guess?), so my approach may be 
off, but I would appreciate any suggestions you may have. Thank you. 

-----------------------------

From: Alan Broadman <broadman at paul.rutgers.edu>
Subject: Prompt as Current Directory?
Date: 16 Nov 89 05:56:13 GMT
To:       info-unix at sem.brl.mil


I have a (hopefully) simple question. How can you get the UNIX prompt
to always reflect the path to the current directory. Such a prompt
would change with each 'cd ' command. In MS-DOS this is done by the
command : 'prompt $P'. I think this would be most helpful, as
otherwise, the prompt string is quite useless.

						Allen Broadman
						Broadman at paul.rutgers.edu

-----------------------------

From: Rouben Rostamian <rostamia at umbc5.umbc.edu>
Subject: Re: Prompt as Current Directory?
Date: 16 Nov 89 12:42:16 GMT
Sender: newspost at umbc3.umbc.edu
To:       info-unix at sem.brl.mil

In article <Nov.16.00.56.12.1989.9985 at paul.rutgers.edu> broadman at paul.rutgers.edu (Alan Broadman) writes:
|
|I have a (hopefully) simple question. How can you get the UNIX prompt
|to always reflect the path to the current directory. Such a prompt
|would change with each 'cd ' command. In MS-DOS this is done by the
|command : 'prompt $P'. I think this would be most helpful, as
|otherwise, the prompt string is quite useless.
|

Oh boy!  Are your in trouble!  Get out your flame-retardant suit.

Hint:  Also read the monthly posting of frequently asked question.

-----------------------------

From: Christopher Davis <ckd at bu-pub.bu.edu>
Subject: Re: Prompt as Current Directory?
Date: 16 Nov 89 12:51:42 GMT
Sender: daemon at bu-cs.bu.edu
To:       info-unix at sem.brl.mil

>>>>> On 16 Nov 89 05:56:13 GMT, broadman at paul.rutgers.edu (Alan Broadman)
>>>>> said:

Alan> I have a (hopefully) simple question. How can you get the UNIX prompt
Alan> to always reflect the path to the current directory. Such a prompt
Alan> would change with each 'cd ' command. In MS-DOS this is done by the
Alan> command : 'prompt $P'. I think this would be most helpful, as
Alan> otherwise, the prompt string is quite useless.

Depends--what shell are you using?  If you're using tcsh (or can chsh to
it, or can get your sysadmin to put it up, etc) you can just do what I do:

set prompt="%t ckd@%m : %~ %% "

which results in something like:

7:47am ckd at bucsf : ~/bin % 

the %m being the short hostname (hey, you use multiple machines, you start
to need these memory joggers when you get old) and the %~ being the magic
part that puts the current working directory in there (properly
~-abbreviated when I'm in my own directory tree).

See man tcsh, again assuming you can get it set up--it's got other nice
stuff, such as emacs-like command line editing (as well as some
vi-like editing, I hear, but I wouldn't know... :-), tab completion of
commands and filenames, et. al.

If you can't get tcsh, let me dig out this unghodly set of aliases I stole
from someone (who stole them from someone, who stole them from someone,
unto their forefathers before them, yea, verily...) that put the hostname
and trailing directory component into the prompt.  They wouldn't be hard to
hack to put the full cwd in.
-- 
 Christopher Davis, BU SMG '90  <ckd at bu-pub.bu.edu> <smghy6c at buacca.bitnet>
 "Technology is dominated by those who manage what they do not understand."

-----------------------------

From: John Woodgate <woodgate at pyrltd.uucp>
Subject: Re: Prompt as Current Directory?
Date: 16 Nov 89 14:19:02 GMT
To:       info-unix at sem.brl.mil

In article <Nov.16.00.56.12.1989.9985 at paul.rutgers.edu> 
broadman at paul.rutgers.edu (Alan Broadman) writes:
 
>How can you get the UNIX prompt to always reflect the path to the 
>current directory. 

Try this (from my .cshrc)

set prompt="$cwd> "
alias cd 'cd \!* ; set prompt="$cwd> "'

John Woodgate           * Any resemblance between the above *       -mm-------
Pyramid Technology Ltd. * views and those of employer, my   *     ---mmmm-----
 ..ukc!pyrltd!woodgate   * wife, or my kids, is pure chance  *   -----mmmmmm---
Tel : +44 252 373035    * and never likely to be repeated.  * -------mmmmmmmm-

-----------------------------

From: Guy Harris <guy at auspex.auspex.com>
Subject: Re: termios question, PENDIN option
Date: 16 Nov 89 23:24:03 GMT
To:       info-unix at sem.brl.mil

>Does anyone know how the PENDIN c_lflag option is used in SVR.4.0
>termio(7)?
>The description of PENDIN in the manual page is:
>
>	"Retype pending input at next read or input character"
>
>I believe that the C shell file completion code uses this feature.

Yes, it does, unfortunately.  It also does TIOCSTI's with echo turned
off, and various other acts that make life difficult for certain kinds
of "editor-based shell windows" (e.g., the Sunview "cmdtool").

>Any information about PENDIN and how the C shell uses this would be
>greatly appreciated.

Well, from the SunOS 4.0 TERMIO(4):

     If PENDIN is set, any input that has not yet been read  will
     be reprinted when the next character arrives as input.

Basically, it causes any input that's been collected but not handed
upstream to be removed from the input queue and then re-run through the
input processing mechanism.  (The same is true in 4.xBSD.)  I.e., if
you've typed "foobar" but no <RETURN>, and are in canonical mode, the
line being assembled - that is, the "foobar" - will be undone, and then
the "foobar" will be treated as input again, so you'll see another
"foobar" echoed if ECHO is on.  However, only the "foobar" will be in
the input queue.

And, as for the way the C shell uses it:

Whoever decided to use these particular techniques (Ken Greer, probably,
as his name appears on the C shell code that uses them) perhaps decided
that it was too costly to just have the C shell run in uncooked, no-echo
mode, and do all the input processing itself.  They may be right,
although I was quite happy with the Korn shell doing so; the machines in
question weren't overloaded time-sharing machines, though, so maybe if
you've got 50 users on an 11/750 or something similarly unfortunate, it
actually makes a difference. 

The mechanism they chose to avoid running in uncooked, no-echo mode was:

	1) Set the "secondary end-of-line" character in the tty driver
	   to be ESC, which is the "complete" character telling the
	   shell to try to do completion on the current string; this
	   means that the "line", in effect, ends when the user hits
	   <ESC>.  The "query" character, used by the user to ask the
	   shell to list all the completions, is ^D; that's normally the
	   EOF character, so it also terminates the "line".

	2) This means that if you type "cat /etc/passw<ESC>", the shell
	   sees "cat /etc/passw<ESC>" as a line, and those characters
	   are no longer part of the "line" being accumulated.  The
	   shell wants to "give them back" to the tty driver, so that
	   the "line" being accumulated again becomes "cat /etc/passw",
	   and then give the "d" back to the tty driver as well.

	3) The TIOCSTI "ioctl" permits it to "give characters back" to
	   the tty driver.  However, if echo is on, they are echoed,
	   since TIOCSTI causes the driver to pretend that the character
	   in question had just been typed.  However, the "cat
	   /etc/passw" is on the screen, so it doesn't want to have
	   them echoed.  Thus, it turns echoing off and TIOCSTI's the
	   characters in question.  It then turns echoing back on, and
	   echoes whatever characters compose the completion of the
	   string.

	4) However, as noted in the comment in the completion code:

		/*
		 * Tabs in the input line cause trouble after a pushback.
		 * tty driver won't backspace over them because column
		 * positions are now incorrect. This is solved by retyping
		 * over current line.
		 */

	   I.e., this TIOCSTI'ing may confuse the tty driver.  So, to
	   fix this, it:

		1) it sends a CR to the terminal, to zip the cursor back
		   to column 0;

		2) reprints the prompt;

		3) pushes the characters back, still with echoing off;

		4) sets the PENDING flag, so that those characters will
		   be "retyped", this time with echoing on.

	  The net effect of 2), 3), and 4) is to cause everything that
	  was on the line to be printed all over again.

-----------------------------

From: William Lewis <wiml at blake.acs.washington.edu>
Subject: Quiet background proc. in CSH
Date: 17 Nov 89 05:14:54 GMT
Keywords: quiet, "&", c-shell
To:       info-unix at sem.brl.mil


   I've written a shell script (in C shell; it's a .login script) that
invokes a couple of background pipes. The pipes work fine but when they
finish, they print a 

  [1] Done      ( blah blah very long pipe here ... )

 message. Is there any way to get rid of this message? Preferably a way
that would also get rid of the

 [1] 5628  

  message as well, although this is less important as it's short, unobtrusive,
always in the same place, etc. 
   Any help appreciated =8) (The FM for csh doesn't seem to say anything 
about this...)

     --- phelliax
-- 
wiml at blake.acs.washington.edu        (206)526-5885      Seattle, Washington

-----------------------------


End of INFO-UNIX Digest
***********************



More information about the Comp.unix.questions mailing list