Mail not delivered yet, still trying

SMTP MAILER postmaster at sandia.gov
Fri Oct 13 04:07:54 AEST 1989


 ----Mail status follows----
Have been unable to send your mail to <omalley%hotair at decwrl.dec.com>,
will keep trying for a total of three days.
At that time your mail will be returned.

 ----Transcript of message follows----
Date: 12 Oct 89 05:53:00 MDT
From: info-unix at BRL.MIL
Subject: INFO-UNIX Digest  V8#090
To: "omalley" <omalley%hotair at decwrl.dec.com>

Return-Path: <incoming-info-unix-request at sandia.gov>
Received: from SEM.BRL.MIL by sandia.gov with SMTP ; 
          Thu, 12 Oct 89 04:51:20 MDT
Received: from SEM.BRL.MIL by SEM.brl.MIL id ab20946; 12 Oct 89 2:59 EDT
Received: from sem.brl.mil by SEM.BRL.MIL id aa20850; 12 Oct 89 2:46 EDT
Date:       Thu, 12 Oct 89 02:46:20 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#090
Message-ID:  <8910120246.aa20850 at SEM.BRL.MIL>

INFO-UNIX Digest          Thu, 12 Oct 1989              V8#090

Today's Topics:
                  Re: Honey-Danbear UUCP Availability
                    Getting the most for a process.
                                Re: pic
                           Re: Version 9 Unix
                              cut for BSD
                  Re: Getting the most for a process.
                        Re: Stupid awk question
                      Making a named pipe over NFS
                       Re: home unix on the cheap
                       Re: Bourne shell question
                  Re: Getting the most for a process.
                        Re: Stupid awk question
                   Looking for the program "gone"...
                         recommendations wanted
                    printf() with vector arguments.
                    Re: Making a named pipe over NFS
   SUN QUESTION: CDC Sabre 1.2 Gigabyte drives w/ Xylogics 753 ctrlr
                upper limit of NFILE and NINODE on 286?
                               Re: TcP/Ip
                UNIX backup to unattended 8mm tape drive
                        Re: Stupid awk question
                         Re: Reversing a file?
                        Vi Reference - version 6
                      Dutch Vi Reference available
                        Vi Reference - version 6
                         Re: Reversing a file?
-----------------------------------------------------------------

From: Harry Skelton <harrys at tons61.uucp>
Subject: Re: Honey-Danbear UUCP Availability
Date: 10 Oct 89 11:41:19 GMT
Keywords: uucp unix
To:       info-unix at sem.brl.mil

Even our machines, with current release of 3.2 Sys V, does not have HDB.  Our
vendor stated that they did not plan to support it or they'll support it in
a 4.x release (eons down the road).

It may be to your advantage to get something like the other PD uucp's and hack
it for your machine.  I'm using a uupc hack to build it up to HDB stanadard 
w/ zmodem. With normal work hours and home life, I don't think it will be 
finished anytime soon.  I'll post to alt.sources when I get it running.
-- 
Harry Skelton - Senior Systems Administrator - U.S. Dept. of Transportation
   ..!attctc!tons61!harrys ..!obdient!tons61!harrys ..!tfd!tons61!harrys
[  Views expressed by Harry Skelton are not those of the US Gov. or CBSI  ]

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

From: Doug Perlich <doug at cogent.uucp>
Subject: Getting the most for a process.
Date: 10 Oct 89 20:18:01 GMT
Keywords: Dedication, priority.
To:       info-unix at sem.brl.mil

I have recently become interested in having an application program run as fast
as possible!  (Sound familiar)?

What I am interested in is how can a program get a higher priority at run time.
More exactly what other methods are there to get screaming performance out of
a UNIX machine.
As I understand it only root can use a negative nice to make a program run
faster, are there ways of dedicating a processor (w/ or wo/ a multiprocessor)?

I am mainly interested in a multi-user system.

It seems to me the answer is no because then every programmer would try this
in his/her code and the system would halt.

-Doug.
 .
 .

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

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: pic
Date: 11 Oct 89 06:47:54 GMT
To:       info-unix at sem.brl.mil

In article <46215f96.81da at digital.sps.mot.com> chen at digital (Jinfu Chen) writes:
>Every once a while I find some *roff documents include simple pictures
>to be processed via `pic'. Where's this `pic' program comes from?

"pic" is part of the Documenter's WorkBench package licensed by AT&T.
Sometimes DWB is bundled with a vendor's implementation of UNIX,
sometimes it is available from the vendor as an extra-cost option,
and sometimes you have to turn to a third party (e.g. Elan, SoftQuad)
to obtain it.  I know of no public-domain implementation of "pic".

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

From: Doug Gwyn <gwyn at smoke.brl.mil>
Subject: Re: Version 9 Unix
Date: 11 Oct 89 07:01:34 GMT
To:       info-unix at sem.brl.mil

In article <1989Oct10.215504.3391 at sdsu.edu> arul at sdsu.edu (Arul Ananthanarayanan) writes:
>I am curious as to what Version 9 Unix is like. I hear that it is run
>in-house at Bell Labs.
>Is it similar to System V, or BSD4.3?
>Pointers to any papers would be greatly appreciated.

Ninth Edition Unix evolved from the Eighth Edition, which evolved from
4BSD.  Along the way, many modifications and additions occurred, among
them the "streams" I/O subsystem (precursor of System V STREAMS), file
system switch, network filesystem, processes as files, Blit support,
and much more.  Apart from the BLTJ special issue on Unix (not the
BSTJ special issue!), papers can be found in many of the USENIX
Conference Proceedings and in a few other journals.  The Tenth Edition
of the Unix documentation is being prepared now (the system itself
undergoes continual evolution; the hardcopy documentation is officially
updated every so often).

UNIX System V Release 4 will include much of the Ninth Edition's
facilities, generally in somewhat revised form.

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

From: Quang Ngo <quang at csuf3b.uucp>
Subject: cut for BSD
Date: 11 Oct 89 07:54:51 GMT
To:       info-unix at sem.brl.mil


There is a cut command for System V, but not for BSD.  Is there such a command
for BSD that acts like cut?

Thank you,

Quang Ngo^

********************************************************************************
/*
 * email = quang at csufres.csufresno.edu          
 *         quang at redwood.UUCP                  
 */                                               
********************************************************************************

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

From: George Seibel <seibel at cgl.ucsf.edu>
Subject: Re: Getting the most for a process.
Date: 11 Oct 89 08:31:31 GMT
Sender: daemon at cgl.ucsf.edu
Keywords: Dedication, priority.
To:       info-unix at sem.brl.mil

In article <593 at cogent.UUCP> doug at cogent.UUCP (Doug Perlich) writes:
>I have recently become interested in having an application program run as fast
>as possible!  (Sound familiar)?

Yup.

>What I am interested in is how can a program get a higher priority at run time.
>More exactly what other methods are there to get screaming performance out of
>a UNIX machine.
>As I understand it only root can use a negative nice to make a program run
>faster, are there ways of dedicating a processor (w/ or wo/ a multiprocessor)?
>
>I am mainly interested in a multi-user system.
>
>It seems to me the answer is no because then every programmer would try this
>in his/her code and the system would halt.

Even if you get 100% of the machine, you only go as fast as the machine
will run your program.  Here's what to do if you *really* want to go fast:

1) Choose the best algorithm.  e.g. Quicksort beats Bubble sort...
2) profile the application with representative inputs.  The usual
   scenario is:

   cc -p applic.c -o applic  [could be f77 or pc instead of cc]
   applic                    [will produce file "mon.out"]
   prof applic > prof.out
   
   Now look in prof.out.  This should tell you where your program is
   spending its time.  Look at those parts of the code.  Are they doing
   unnecessary work?   Find a hacker and ask how to make it go faster.
   Bringing frequently-called functions inline is usually a win.
   If you're doing a lot of I/O, can it be brought in-core?  Can you
   use binary files instead of formatted files?   Check out the options
   on your compiler.  Try the optimisation options.  Make sure you are
   not using runtime bounds checking.   Are you even using a compiler?
   If the application is written in an interpreted language, there
   probably is no profiler or optimiser.  Consider rewriting.

What if you aren't a programmer, or you don't have the source code?

3) Buy a faster computer.  (This is also a valid solution if you *are*
   a programmer)

George Seibel, UCSF

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

From: "Jonathan I. Kamens" <jik at athena.mit.edu>
Subject: Re: Stupid awk question
Date: 11 Oct 89 06:48:16 GMT
Sender: news at bloom-beacon.mit.edu
To:       info-unix at sem.brl.mil

In article <DMAUSTIN.89Oct10145918 at vivid.sun.com> dmaustin at vivid.sun.com
(Darren Austin) writes:
>Hi all,
>	I am trying to split up a large output file into several
>smaller files.  The smaller files are named after the value in
>the second field.  I tried using the following simple awk script,
>
>(current == $2) {print > current".summary"}
>(current != $2) {close(current".summary");current=$2;print > current".summary";}
>
>but it fails with 
>
>awk: too many output files 10

  Allow me to quote from "Awk -- A Pattern Scanning and Processing
Language (Second Edition)", by Alfred V. Aho, Brian W. Kernighan, and
Peter J. Weinberger.  I got my copy out of /usr/doc on my system.

  Page 2, on section 1.4 about printing, says, "Naturally there is a
limit on the number of output files; currently it is 10."

  A lot of implementations have overcome this limitation.  Apparently,
the version of awk you are using has not.

  May I suggest either nawk (I don't know where/under what conditions
that's available), or gawk (available for nothing whereever fine GNU
products are distributed)?

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

P.S.  Despite the title you gave it, it's not really a "stupid" awk
question, especially since the man page doesn't even appear to mention
this limitation, or at least not that I could find.

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

From: Richard O'Keefe <ok at cs.mu.oz.au>
Subject: Making a named pipe over NFS
Date: 11 Oct 89 12:35:34 GMT
Sender: news at cs.mu.oz.au
Keywords: /etc/mknod, fifo, NFS, SunOS
To:       info-unix at sem.brl.mil

I am using a Sun-3/50 called mudla.  Here's what /etc/motd says about it:
SunOS Release 4.0_Export (MULLO_CLIENT_50) #1: Wed May 24 18:23:08 EST 1989

My files are held on a file server called mullauna, an Encore Multimax,
and are accessed through NFS.  Here's what I see when I log in on mullauna:
UNIX System V Release ax.2.2f ns32332

Now, SunOS supports named pipes, and System V supports named pipes, and
the network is the computer, so named pipes should work, not so?  No.

On mullauna (the server), in my home directory:
	% rm -f zabbo
	% /etc/mknod zabbo p
	% file zabbo
	zabbo:		fifo
just as I would expect.
On mudla (the client), in my home directory (the same directory):
	% rm -f zabbo
	% /etc/mknod zabbo p
	% file zabbo
	zabbo:		empty
This came as a rather unpleasant surprise.  To check whether SunOS really
does understand named pipes, I tried
	% rm -f /tmp/zabbo
	% /etc/mknod /tmp/zabbo p
	% file /tmp/zabbo
	/tmp/zabbo:	fifo
mudla's /tmp is served from another Sun-3.

    Is this supposed to work, or should I just forget about named pipes?

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

From: Wm E Davidsen Jr <davidsen at crdos1.crd.ge.com>
Subject: Re: home unix on the cheap
Date: 11 Oct 89 15:05:33 GMT
To:       info-unix at sem.brl.mil

In article <34345 at srcsip.UUCP>, jkimball at SRC.Honeywell.COM (John Kimball) writes:
|  I've started to think about acquiring a home Unix machine, to replace my
|  CP/M machine.
|  
|  The main purposes would be
|      o email and news
|      o ability to run most of the freely-redistributable software we use
|        at work (mainly GNU stuff)

  If you really only want what you describe, buy a used unix-pc. It's
slow and somewhat limited, but it will do what you want and should be
<$1000 for the machine and software.

  If you want more performance buy a cheap 386 and cheap UNIX. The
unmodified SysV versions like ix/386 and ESIX have the AT&T compiler,
Xenix has it's own, more ANSI features, cross compiles to DOS, costs
more. Having used both I find about the same number of bugs in each, but
diferent bugs. If you don't need ANSI or DOS go with the regular SysV
or SCO UNIX, has both compilers and does OS/2 (whoopee?).

  If you want cheap BSD look for a refurbished Sun-2. A friend of mine
got one with mono and color for about $2k. They are advertised in the
magazines from time to time.

Repair
======

  unix-pc - good luck. There are places which do it.
  386 - warantee, lots of places repair.
  Sun-2 - ask locally, it varies. Usually not cheap.
-- 
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: "Conor P. Cahill" <cpcahil at virtech.uucp>
Subject: Re: Bourne shell question
Date: 11 Oct 89 12:06:12 GMT
Keywords: pipe, logical 'or' and " pg ".
To:       info-unix at sem.brl.mil

In article <1943 at sactoh0.UUCP>, jak at sactoh0.UUCP (Jay A. Konigsberg) writes:

> 
> When the pipe into " pg " is removed it works ok, but I would like
> to keep the pg in the script.

Your problem is that pg always exits with a 0 (at least I could not get
any non-zero exit) and therefore the stuff to the right of the  || will never
be executed.  You could do the following:

(ls -l | grep "^d" || echo "There are no subdirectories" ) | pg

or you could re-write the script so it used more than 1 line:

	ls -l | grep "^d" > /tmp/sh$$

	if [ $? = 0 ]; then
		pg /tmp/sh$$
	else
		echo "There are no ..."
	fi

	rm /tmp/sh$$

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

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

From: Jim Frost <madd at bu-cs.bu.edu>
Subject: Re: Getting the most for a process.
Date: 11 Oct 89 19:06:12 GMT
Followup-To: comp.unix.questions
To:       info-unix at sem.brl.mil

In article <12034 at cgl.ucsf.EDU> seibel at cgl.ucsf.edu (George Seibel) writes:
|In article <593 at cogent.UUCP> doug at cogent.UUCP (Doug Perlich) writes:
|>More exactly what other methods are there to get screaming performance out of
|>a UNIX machine.

|
|Even if you get 100% of the machine, you only go as fast as the machine
|will run your program.  Here's what to do if you *really* want to go fast:

Very valid techniques.  There are others that may work depending on
your application which can squeeze even more performance out of your
machine.

UNIX splits up the CPU amongst processes (and threads if your UNIX
supports them).  A single application can thus get more CPU at the
same priority if you can break the job up between multiple processes
or threads.  It's generally easier to do this with threads than with
separate processes, but you can do pretty well with separate processes
and shared memory for a lot of tasks -- particularly sequential
independent calculations (often found inside loops).

A simple shell script illustrates the principle:

	#! /bin/csh
	foreach i (/usr/*)
	  find $i -name foo
	end

versus:

	#! /bin/csh
	foreach i (/usr/*)
	  find $i -name foo &
	end

The latter will finish much faster (unless it thrashes the system),
but it has at least one problem -- output will become intermingled
unless you give each process its own output file.  The same sorts of
problems will have to be solved for a real application; see any
operating systems book for lots of solutions.

This method of parallelism is seen most often on multiprocessor
machines since processes will tend to execute on separate processors
and you get incredible throughput improvements.  On the Encore
Multimax this technique is used for grep and make, for instance.  The
technique still works on single processors -- obviously so since the
whole idea behind multitasking is to fully utilize the CPU (amongst
other resources), but usually not as well.

|>It seems to me the answer is no because then every programmer would try this
|>in his/her code and the system would halt.

Yes, this technique will definitely hurt the system if you run too
many parallel processes, but so will any technique that gives a single
application more than its "share" of CPU.  It's also a lot harder
because you have to coordinate processes so many people won't bother
unless they really need it or the system makes such a thing easy (I
have yet to see a system where it was particularly easy to parallelize
tasks effectively :-).

jim frost
software tool & die
madd at std.com

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

From: Mitchell Wyle <wyle at inf.ethz.ch>
Subject: Re: Stupid awk question
Date: 11 Oct 89 17:00:11 GMT
To:       info-unix at sem.brl.mil

In article <DMAUSTIN.89Oct10145918 at vivid.sun.com> 
dmaustin at vivid.sun.com (Darren Austin) writes:

>I am trying to split up a large output file into several
>smaller files.  The smaller files are named after the value in
>the second field.  I tried using the following simple awk script,
>
>(current == $2) {print > current".summary"}
>(current != $2) {close(current".summary");
> current=$2;print > current".summary";}
>
>but it fails with 
>
>awk: too many output files 10


Even though everyone will soon have new awk and all these old awk problems
will go away, I think this question deserves to be in the "Frequently
asked questions and answers" periodic postings.  Who moderates it?  How
should one post to it?

* * *

To answer the question, I shall quote verbatum an old article.

>>I am trying to use AWK to split one file into many formatted, smaller files.
>>The problem I am having is that I cannot output to more than 10 files...
>  
> Well, it won't help you right now, but the long-term fix is to complain
> to your software supplier and ask them to get rid of the silly limit.
> It's not that hard.

The limits are based on the number of file descriptors that can be open
at one time (usually small).  One way that I often get around this is
by writting something like this which splits up the input on the field
$1 .

sort +0 |
awk '
{
        if (last != $1) {
                if (NR > 0) print "!XYZZY";
                print "cat > " $1 "<<!XYZZY";
                last = $1;
        }
        print;
}
END { if (NR > 0) print "!XYZZY"; }' | /bin/sh

        Tony O'Hagan                    tonyo at qitfit.qitcs.oz

* * *

I use Tony's solution all the time.  I have seen it used by at least
two other people (David Goodenough and Amos Shapiro) in shell scripts
posted to the net.

It is very important to put that trailing End_of_Here_Document string
in the END clause of your awk program!  Depending on the complexity of
your parse, you might need other cleanup code  there as well.

Happy hacking, 

-Mitchell F. Wyle
Institut fuer Informationssysteme         wyle at inf.ethz.ch 
ETH Zentrum / 8092 Zurich, Switzerland    +41 1 256 5237
--
If this appears in _IN_MODERATION_ or ClariNet, please let me know.
I am forbidden to tell you that you can reach me at:
 ...!uunet!mcvax!ethz!wyle   or    wyle at rascal.ics.utexas.edu

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

From: Marty Saletta <sale5312 at fredonia.uucp>
Subject: Looking for the program "gone"...
Date: 11 Oct 89 20:23:59 GMT
To:       info-unix at sem.brl.mil



   Yes, can some nice person in NetLand tell me where I can get a copy
of the PD program gone?  Gone is an alternative to "lock" that
I used earlier this year from comp.sources.unix (or one of the
other newsgroups.)


   Thanks in advance!

   -Marty


-- 
 /    /  |\ |  /   / |  / ~Marty Saletta @ Fredonia,New York~~Leafs:3rd place~
/ __ /__ | \| /__ /  | /  ~Atari ST,New York Yankees,Who,Pink Floyd,ELP,Fripp~
\  / \   |  | \   \  | \  ~Toronto Maple Leafs,Yes,CZ-1,Mad Max,and hi Lorie!~
 \/   \  |  |  \  /  | /  ~UUCP:...{decvax,rutgers}!sunybcs!fredonia!sale5312~

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

From: Chris Gregory <chris at tiamat.fsc.com>
Subject: recommendations wanted
Date: 11 Oct 89 20:47:14 GMT
Followup-To: comp.dcom.lans
Keywords: TCP/IP, ethernet, SCO Unix 3.2, vendors
To:       info-unix at sem.brl.mil

A couple of questions:

1)   Where can I get TCP/IP for SCO Unix 3.2?

          Surely someone out there is using it.  I've been
          calling around, but can't seem to find a anyone that
          has it.

2)   Where is a good place to get ethernet cards?

          I'd probably be able to find these, but I'd like some
          recommendations-comments-complaints about places others
          have dealt with.

Thank you.

     Chris Gregory                              --o--
     Ahlstrom Filtration, Inc.                ---ooo---
     (formerly Filtration Sciences Corp.)     ==:::::==       
     chris at tiamat.fsc.com                       =:::=

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

From: Paul Reger <paulr at sequent.uucp>
Subject: printf() with vector arguments.
Date: 11 Oct 89 18:02:59 GMT
Keywords: printf()
To:       info-unix at sem.brl.mil


I was wondering if there exists such a beast as:

void vec_printf(char *fmt,void *args[]);

(as opposed to what we're all familiar with: void printf(char *fmt, ...);)

Such a thing would be useful for a tool that can be used with any
shell - call it shell_printf.  This would have the synopsis:

shell_printf fmt [arg1 [arg2 [arg3 ... [argn]]]]

and its purpose would be to format and print out its arguments to
stdout in the exact same manner as printf() does.  Such a tool would
be useful for output in shell scripts. For example:

shell_printf "There are %9d dogs, weighing %9g pounds, and my son's name is '%s'.\n\n\n" 100 12.23 Eric

which would print out to stdout:

``
There are       100 dogs, weighing     12.23 punds, and my son's name is 'Eric'.


''

Without the vec_printf() routine, such a tool would be hard to do.


			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: David Robinson <david at elroy.jpl.nasa.gov>
Subject: Re: Making a named pipe over NFS
Date: 11 Oct 89 23:08:55 GMT
Keywords: /etc/mknod, fifo, NFS, SunOS
To:       info-unix at sem.brl.mil

In article <2388 at munnari.oz.au> ok at cs.mu.oz.au (Richard O'Keefe) writes:
<I am using a Sun-3/50 called mudla.  Here's what /etc/motd says about it:
<SunOS Release 4.0_Export (MULLO_CLIENT_50) #1: Wed May 24 18:23:08 EST 1989
<
<My files are held on a file server called mullauna, an Encore Multimax,
<and are accessed through NFS.  Here's what I see when I log in on mullauna:
<UNIX System V Release ax.2.2f ns32332
<
<Now, SunOS supports named pipes, and System V supports named pipes, and
<the network is the computer, so named pipes should work, not so?  No.
[Description of how it fails]
<    Is this supposed to work, or should I just forget about named pipes?

Named pipes are not the the current NFS protocol (v2), but they are
supported in some NFS implementations.  In SunOS 3.2 named pipes were added
and the corresponding NFSSRC 3.2(may be off on the number), which many
vendors base their NFS on, included a kludge to handle named pipes
correctly.  Most vendors have picked this up but not all.  

It would appear that either Encore is running an NFS based on an old
version of the reference port or they built their own from scratch.
In either case it is a problem with your vendor's code.




-- 
	David Robinson		elroy!david at csvax.caltech.edu     ARPA
				david at elroy.jpl.nasa.gov	  ARPA
				{cit-vax,ames}!elroy!david	  UUCP
Disclaimer: No one listens to me anyway!

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

From: Farooq Butt <fmbutt at cloud9.stratus.com>
Subject: SUN QUESTION: CDC Sabre 1.2 Gigabyte drives w/ Xylogics 753 ctrlr
Date: 11 Oct 89 22:40:17 GMT
Followup-To: poster
To:       info-unix at sem.brl.mil


 Has anyone in Sun-land hooked up CDC Sabre 1.2 Gigabyte drives to 
 Sun 3/280s  (with 753 or 7053 (aka SMD4 ctrlr) ctrlr) ?
 If so pleeeeeeeease mail me the format.dat entries for these drives.
 DIP switch info. will be appreciated too. I am going out of my 
 mind trying to figure out whether Sun supports the CDC Sabre 1.2 Gbyte 
 drive.... 

 Thanks a Giga-load, 
  Fmb


-- 
NOTHING  in the above article has the slightest relationship to reality. 
If any reality correspondences are found, please notify me IMMEDIATELY.  
Any threats, abuse or stupidity of any kind are purely UNINTENTIONAL. 
My employer does not know that I exist and is not responsible for anything.

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

From: "Barton A. Fisk" <barton at holston.uucp>
Subject: upper limit of NFILE and NINODE on 286?
Date: 11 Oct 89 22:53:56 GMT
Keywords: 286, sco, xenix
To:       info-unix at sem.brl.mil

What, if any would be the upper limit that may be
set for NFILE and NINODE in /usr/sys/conf/master for
a 286?

What determines this limit?      

What would be the most painless way of finding out
if a value has taken effect for these variables?

Many thanks in advance as usual. 
-- 
Barton A. Fisk          | UUCP: {attctc,texbell,vector}!warble!holston!barton
PO Box 1781             | (PSEUDO) DOMAIN: barton at holston.UUCP     
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | "Let him who is without sin cast the first stone"-JC

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

From: Lyndon Nerenberg <lyndon at cs.athabascau.ca>
Subject: Re: TcP/Ip
Date: 11 Oct 89 23:00:22 GMT
To:       info-unix at sem.brl.mil

In article <21092 at adm.BRL.MIL> CSSNET%NUSDISCS.BITNET at cunyvm.cuny.edu writes:


> Wollongong Integrated Networking WIN/3B: Release 2.1
> AT&T 10base5 Network Interface (NI) Package: Release 1.1

Release 2.1 contains a number of bugs -- enough to make it almost
unuseable. About the only solution is to upgrade to WIN/TCP 3.0.

You also need to do some heavy tuning of the kernel parameters.
We run with the following parameters:

	master.d/tcp	NTCP=64
	master.d/ucp	NUDP=128
	
You also need to crank up some of the streams stuff (TIMOD & TIRDWR)
but I don't have the specific values handy.

> We are running the above on our AT&T 3B4000/15

Pity.

-- 
Lyndon Nerenberg  VE6BBM / Computing Services / Athabasca University
  {alberta,decwrl,lsuc}!atha!lyndon || lyndon at cs.AthabascaU.CA
     "I think every man should have a wife.  You can't blame
         everything on the government."  -- Jed Clampett

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

From: Dave Thompson <davet at iscuva.iscs.com>
Subject: UNIX backup to unattended 8mm tape drive
Date: 12 Oct 89 00:52:55 GMT
Keywords: backup
To:       info-unix at sem.brl.mil

We would like help finding a software package to do UNIX backups.

We have an Ethernet LAN with a number of UNIX boxes, each with a hard disk.
We have a DEC microVAX 2 with an 8mm 2.3 Gigabyte Exabyte tape backup system.
We want to backup the UNIX boxes, one after another, onto one 8mm tape,
unattended.

Is there software out there that can do the job???  Thanks for any help or
info that you have.

Respond to: David Thompson at davet at iscuva.iscs.com

-- 
David Thompson                UUCP: davet at iscuva.ISCS.COM
ISC-Bunker Ramo Corporation         (uunet!iscuva!davet)
East 22425 Appleway           Phone: +1 509 927 5115
Liberty Lake, WA  99019

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

From: 9704 <bink at aplcen.apl.jhu.edu>
Subject: Re: Stupid awk question
Date: 12 Oct 89 02:07:49 GMT
To:       info-unix at sem.brl.mil

In article <3731 at ethz-inf.UUCP> wyle at ethz.UUCP (Mitchell Wyle) writes:
> In article <DMAUSTIN.89Oct10145918 at vivid.sun.com> Darren Austin writes:
> 
> >I am trying to split up a large output file into several
> >smaller files.  The smaller files are named after the value in
> >the second field.  I tried using the following simple awk script,
> > [...]
> >but it fails with 
> >awk: too many output files 10
>
> [...]
> sort +0 | awk '[SCRIPT BY TONY O'HAGAN DELETED]' | /bin/sh
> [...]

If you don't have access to the new AWK, but do have the "bs" command
(mini-language) on your machine, I've found it also works well for
splitting a file into subfiles which are named by a field of the input.
The following bs program should solve Mr. Austin's problem in one process:

#!/bin/bs
#  Split the input into files named by the 2nd field.
outfile = ""
while ?(line = get)
	match (line, "[^\t ]*[\t ]*\([^\t ]*\)")
	if mstring(1) != outfile    open ("put", outfile=mstring(1), "w")
	put = line
next
run

(The open seems to automatically close the previous file)
I don't know how portable this is; bs is available in System V.2 anyway.
Type ^N now for a way to do this in 1 line of PERL, by Mr. Schwartz...   ;-)

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

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

From: Donald McLachlan <don at dgbt.uucp>
Subject: Re: Reversing a file?
Date: 9 Oct 89 04:06:34 GMT
To:       info-unix at sem.brl.mil


	If you wnat to reverse the lines from right to left, try the
command 'rev filename'.

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

From: Maarten Litmaath <maart at cs.vu.nl>
Subject: Vi Reference - version 6
Date: 5 Oct 89 06:28:23 GMT
Expires: 2 Nov 92 05:00:00 GMT
To:       info-unix at sem.brl.mil

It'll never end.  Many Minor Modifications, some additions.  A patch would
be twice as big.  Still `old' format (what happened to you, Kevin?).
Enjoy.

: This is a shar archive.  Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
CTRL_L="`echo L | tr L '\14'`"
echo Extracting 'vi.ref.6'
sed -e 's/^X//' \
	-e "s/^Control-L$/$CTRL_L/" > 'vi.ref.6' << '+ END-OF-FILE ''vi.ref.6'
X
X
X
X
X
X    ////////////////////////////////////////////////////////////////////////
X    /                         VI REFERENCE (by maart at cs.vu.nl)             /
X    ////////////////////////////////////////////////////////////////////////
X
X    Warning: some vi versions don't support the more esoteric features
X    described in this document.  You can edit/redistribute this document
X    freely, as long as you don't make false claims on original authorship.
X
X    default values          : 1
X    ^X                      : <ctrl>x
X    [*]                     : `*' is optional
X    <*>                     : `*' must not be taken literally
X    <sp>                    : space
X    <cr>                    : carriage return
X    <lf>                    : linefeed
X    <ht>                    : horizontal tab
X    <esc>                   : escape
X    <erase>                 : your erase character
X    <kill>                  : your kill character
X    <intr>                  : your interrupt character
X    <a-z>                   : an element in the range
X    N                       : number (`*' = allowed, `-' = not appropriate)
X    CHAR                    : char unequal to <ht>|<sp>
X    WORD                    : word followed by <ht>|<sp>|<lf>
XControl-L
X
X
X
X
X
X    /////////////////
X    / move commands /
X    /////////////////
X
X     N | Command            | Meaning
X    ---+--------------------+-----------------------------------------------
X     * | h | ^H | <erase>   | <*> chars to the left.
X     * | j | <lf> | ^N      | <*> lines downward.
X     * | l | <sp>           | <*> chars to the right.
X     * | k | ^P             | <*> lines upward.
X     * | $                  | To the end of line <*> from the cursor.
X     - | ^                  | To the first CHAR of the line.
X     * | _                  | To the first CHAR <*> - 1 lines lower.
X     * | -                  | To the first CHAR <*> lines higher.
X     * | + | <cr>           | To the first CHAR <*> lines lower.
X     - | 0                  | To the first char of the line.
X     * | |                  | To column <*> (<ht>: only to the endpoint).
X     * | f<char>            | <*> <char>s to the right (find).
X     * | t<char>            | Till before <*> <char>s to the right.
X     * | F<char>            | <*> <char>s to the left.
X     * | T<char>            | Till after <*> <char>s to the left.
X     * | ;                  | Repeat latest `f'|`t'|`F'|`T' <*> times.
X     * | ,                  | Idem in opposite direction.
X     * | w                  | <*> words forward.
X     * | W                  | <*> WORDS forward.
X     * | b                  | <*> words backward.
X     * | B                  | <*> WORDS backward.
X     * | e                  | To the end of word <*> forward.
X     * | E                  | To the end of WORD <*> forward.
X     * | G                  | Go to line <*> (default EOF).
X     * | H                  | To line <*> from top of the screen (home).
X     * | L                  | To line <*> from bottom of the screen (last).
X     - | M                  | To the middle line of the screen.
X     * | )                  | <*> sentences forward.
X     * | (                  | <*> sentences backward.
X     * | }                  | <*> paragraphs forward.
X     * | {                  | <*> paragraphs backward.
X     - | ]]                 | To the next section (default EOF).
X     - | [[                 | To the previous section (default begin of file).
X     - | `<a-z>             | To the mark.
X     - | '<a-z>             | To the first CHAR of the line with the mark.
X     - | ``                 | To the cursor position before the latest absolute
X                            | jump (of which are examples `/' and `G').
X     - | ''                 | To the first CHAR of the line on which the cursor
X                            | was placed before the latest absolute jump.
X     - | /<string>          | To the next occurrence of <string>.
X     - | ?<string>          | To the previous occurrence of <string>.
X     - | n                  | Repeat latest `/'|`?' (next).
X     - | N                  | Idem in opposite direction.
X     - | %                  | Find the next bracket and go to its match
X                            | (also with `{'|`}' and `['|`]').
XControl-L
X
X
X
X
X
X    /////////////////////////
X    / searching (see above) /
X    /////////////////////////
X
X    :ta <name>              | Search in the tags file where <name> is
X                            | defined (file, line), and go to it.
X    ^]                      | Use the name under the cursor in a `:ta' command.
X    :[x,y]g/<string>/<cmd>  | Search globally [from line x to y] for <string>
X                            | and execute the `ex' <cmd> on each occurrence.
X    :[x,y]v/<string>/<cmd>  | Execute <cmd> on the lines that don't match.
X
X    ///////////////////
X    / undoing changes /
X    ///////////////////
X
X    u                       | Undo the latest change.
X    U                       | Undo all changes on a line, while not having
X                            | moved off it (unfortunately).
X    :q!                     | Quit vi without writing.
X    :e!                     | Re-edit a messed-up file.
X
X    ///////////////////////////////////
X    / appending text (end with <esc>) /
X    ///////////////////////////////////
X
X     * | a                  | <*> times after the cursor.
X     * | A                  | <*> times at the end of line.
X     * | i                  | <*> times before the cursor (insert).
X     * | I                  | <*> times before the first CHAR of the line
X     * | o                  | On a new line below the current (open).
X                            | The count is only useful on a slow terminal.
X     * | O                  | On a new line above the current.
X                            | The count is only useful on a slow terminal.
X     * | ><move>            | Shift the lines described by <*><move> one
X                            | shiftwidth to the right (layout!).
X     * | >>                 | Shift <*> lines one shiftwidth to the right.
X     * | ["<a-z1-9>]p       | Put the contents of the (default undo) buffer
X                            | <*> times after the cursor.
X                            | A buffer containing lines is put only once,
X                            | below the current line.
X     * | ["<a-z1-9>]P       | Put the contents of the (default undo) buffer
X                            | <*> times before the cursor.
X                            | A buffer containing lines is put only once,
X                            | above the current line.
X     * | .                  | Repeat previous command <*> times.
X                            | If the last command before a `.' command
X                            | references a numbered buffer, the buffer number
X                            | is incremented first (and the count is ignored):
X                            |
X                            | "1pu.u.u.u.u      - `walk through' buffers 1
X                            |                     through 5
X                            | "1P....           - restore them
XControl-L
X
X
X
X
X
X    /////////////////
X    / deleting text /
X    /////////////////
X
X    Everything deleted can be stored into a buffer. This is achieved by
X    putting a `"' and a letter <a-z> before the delete command. The
X    deleted text will be in the buffer with the used letter. If <A-Z>
X    is used as buffer name, the adjugate buffer <a-z> will be augmented
X    instead of overwritten with the text. The undo buffer always
X    contains the latest change. Buffers <1-9> contain the latest 9
X    LINE deletions (`"1' is most recent).
X
X     * | x                  | Delete <*> chars under and after the cursor.
X     * | X                  | <*> chars before the cursor.
X     * | d<move>            | From begin to endpoint of <*><move>.
X     * | dd                 | <*> lines.
X     - | D                  | The rest of the line.
X     * | <<move>            | Shift the lines described by <*><move> one
X                            | shiftwidth to the left (layout!).
X     * | <<                 | Shift <*> lines one shiftwidth to the left.
X     * | .                  | Repeat latest command <*> times.
X
X    //////////////////////////////////
X    / changing text (end with <esc>) /
X    //////////////////////////////////
X
X     * | r<char>            | Replace <*> chars by <char> - no <esc>.
X     * | R                  | Overwrite the rest of the line,
X                            | appending change <*> - 1 times.
X     * | s                  | Substitute <*> chars.
X     * | S                  | <*> lines.
X     * | c<move>            | Change from begin to endpoint of <*><move>.
X     * | cc                 | <*> lines.
X     * | C                  | The rest of the line and <*> - 1 next lines.
X     * | =<move>            | If the option `lisp' is set, this command
X                            | will realign the lines described by <*><move>
X                            | as though they had been typed with the option
X                            | `ai' set too.
X     - | ~                  | Switch lower and upper cases.
X     * | J                  | Join <*> lines (default 2).
X     * | .                  | Repeat latest command <*> times (`J' only once).
X     - | &                  | Repeat latest `ex' substitute command, e.g.
X                            | `:s/wrong/good'.
X     - | :[x,y]s/<p>/<r>/<f>| Substitute (on lines x through y) the pattern
X                            | <p> (default the last pattern) with <r>.  Useful
X                            | flags <f> are `g' for `global' (i.e. change every
X                            | non-overlapping occurrence of <p>) and `c' for
X                            | `confirm' (type `y' to confirm a particular
X                            | substitution, else <cr>).  Instead of `/' any
X                            | punctuation CHAR unequal to <lf> can be used as
X                            | delimiter.
XControl-L
X
X
X
X
X
X    ///////////////////////////////////
X    / substitute replacement patterns /
X    ///////////////////////////////////
X
X    The basic meta-characters for the replacement pattern are `&' and `~';
X    these are given as `\&' and `\~' when nomagic is set.  Each instance
X    of `&' is replaced by the characters which the regular expression
X    matched.  The meta-character `~' stands, in the replacement
X    pattern, for the defining text of the previous replacement
X    pattern.  Other meta-sequences possible in the replacement pattern
X    are always introduced by the escaping character `\'.  The sequence
X    `\n' (with `n' in [1-9]) is replaced by the text matched by the
X    n-th regular subexpression enclosed between `\(' and `\)'.  The
X    sequences `\u' and `\l' cause the immediately following character
X    in the replacement to be converted to upper- or lower-case
X    respectively if this character is a letter.  The sequences `\U' and
X    `\L' turn such conversion on, either until `\E' or `\e' is
X    encountered, or until the end of the replacement pattern.
X
X    //////////////////////////////
X    / remembering text (yanking) /
X    //////////////////////////////
X
X    With yank commands you can put `"<a-z>' before the command, just as
X    with delete commands. Otherwise you only copy to the undo buffer.
X    The use of buffers <a-z> is THE way of copying text to another
X    file; see the `:e <file>' command.
X
X     * | y<move>            | Yank from begin to endpoint of <*><move>.
X     * | yy                 | <*> lines.
X     * | Y                  | Idem (should be equivalent to `y$' though).
X     - | m<a-z>             | Mark the cursor position with a letter.
X
X    ////////////////////////////////////////
X    / commands while in append|change mode /
X    ////////////////////////////////////////
X
X    ^@                      | If typed as the first character of the
X                            | insertion, it is replaced with the previous
X                            | text inserted (max. 128 chars), after which
X                            | the insertion is terminated.
X    ^V                      | Deprive the next char of its special meaning
X                            | (e.g. <esc>).
X    ^D                      | One shiftwidth to the left.
X    0^D                     | Remove all indentation on the current line
X                            | (there must be no other chars on the line).
X    ^^D                     | Idem, but it is restored on the next line.
X    ^T                      | one shiftwidth to the right
X    ^H | <erase>            | One char back.
X    ^W                      | One word back.
X    <kill>                  | Back to the begin of the change on the
X                            | current line.
X    <intr>                  | like <esc>.
XControl-L
X
X
X
X
X
X    /////////////////////////////////////////////////
X    / writing, editing other files, and quitting vi /
X    /////////////////////////////////////////////////
X
X    In `:' `ex' commands `%' denotes the current file, `#' is a synonym for
X    the alternate file (which normally is the previous file).
X    Marks can be used for line numbers too: '<a-z>.
X    In the `:w'|`:f'|`:cd'|`:e'|`:n' commands shell meta-characters can be
X    used.
X
X    :q                      | Quit vi, unless the buffer has been changed.
X    :q!                     | Quit vi without writing.
X    ^Z                      | Suspend vi.
X    :w                      | Write the file.
X    :w <name>               | Write to the file <name>.
X    :w >> <name>            | Append the buffer to the file <name>.
X    :w! <name>              | Overwrite the file <name>.
X    :x,y w <name>           | Write lines x through y to the file <name>.
X    :wq                     | Write the file and quit vi; some versions quit
X                            | even if the write was unsuccessful!
X                            | Use `ZZ' instead.
X    ZZ                      | Write if the buffer has been changed, and
X                            | quit vi.  If you have invoked vi with the `-r'
X                            | option, you'd better write the file
X                            | explicitly (`w' or `w!'), or quit the
X                            | editor explicitly (`q!') if you don't want
X                            | to overwrite the file - some versions of vi
X                            | don't handle the `recover' option very well.
X    :x [<file>]             | Idem [but write to <file>].
X    :x! [<file>]            | `:w![<file>]' and `:q'.
X    :pre                    | Preserve the file - the buffer is saved as if
X                            | the system had just crashed; for emergencies,
X                            | when a `:w' command has failed and you don't
X                            | know how to save your work (see `vi -r').
X    :f <name>               | Set the current filename to <name>.
X    :cd [<dir>]             | Set the working directory to <dir>
X                            | (default home directory).
X    :cd! [<dir>]            | Idem, but don't save changes.
X    :e [+<cmd>] <file>      | Edit another file without quitting vi - the
X                            | buffers are not changed (except the undo
X                            | buffer), so text can be copied from one file to
X                            | another this way.  [Execute the `ex' command
X                            | <cmd> (default `$') when t-- 
   Did Andy Tanenbaum get his programming   |Maarten Litmaath @ VU Amsterdam: 
instruction from a Cereal box?  (Sam McCrea)|maart at cs.vu.nl, mcvax!botter!maart

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

From: Maarten Litmaath <maart at cs.vu.nl>
Subject: Dutch Vi Reference available
Date: 5 Oct 89 06:40:08 GMT
To:       info-unix at sem.brl.mil

Email if you're interested.
-- 
   Did Andy Tanenbaum get his programming   |Maarten Litmaath @ VU Amsterdam: 
instruction from a Cereal box?  (Sam McCrea)|maart at cs.vu.nl, mcvax!botter!maart

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

From: Maarten Litmaath <maart at cs.vu.nl>
Subject: Vi Reference - version 6
Date: 5 Oct 89 06:49:50 GMT
Expires: 2 Nov 92 05:00:00 GMT
To:       info-unix at sem.brl.mil

It'll never end.  Many Minor Modifications, some additions.  A patch would
be twice as big.  Still `old' format (what happened to you, Kevin?).
Enjoy!

: This is a shar archive.  Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
: --------------------------- cut here --------------------------
PATH=/bin:/usr/bin:/usr/ucb
CTRL_L="`echo L | tr L '\14'`"
echo Extracting 'vi.ref.6'
sed -e 's/^X//' \
	-e "s/^Control-L$/$CTRL_L/" > 'vi.ref.6' << '+ END-OF-FILE ''vi.ref.6'
X
X
X
X
X
X    ////////////////////////////////////////////////////////////////////////
X    /                         VI REFERENCE (by maart at cs.vu.nl)             /
X    ////////////////////////////////////////////////////////////////////////
X
X    Warning: some vi versions don't support the more esoteric features
X    described in this document.  You can edit/redistribute this document
X    freely, as long as you don't make false claims on original authorship.
X
X    default values          : 1
X    ^X                      : <ctrl>x
X    [*]                     : `*' is optional
X    <*>                     : `*' must not be taken literally
X    <sp>                    : space
X    <cr>                    : carriage return
X    <lf>                    : linefeed
X    <ht>                    : horizontal tab
X    <esc>                   : escape
X    <erase>                 : your erase character
X    <kill>                  : your kill character
X    <intr>                  : your interrupt character
X    <a-z>                   : an element in the range
X    N                       : number (`*' = allowed, `-' = not appropriate)
X    CHAR                    : char unequal to <ht>|<sp>
X    WORD                    : word followed by <ht>|<sp>|<lf>
XControl-L
X
X
X
X
X
X    /////////////////
X    / move commands /
X    /////////////////
X
X     N | Command            | Meaning
X    ---+--------------------+-----------------------------------------------
X     * | h | ^H | <erase>   | <*> chars to the left.
X     * | j | <lf> | ^N      | <*> lines downward.
X     * | l | <sp>           | <*> chars to the right.
X     * | k | ^P             | <*> lines upward.
X     * | $                  | To the end of line <*> from the cursor.
X     - | ^                  | To the first CHAR of the line.
X     * | _                  | To the first CHAR <*> - 1 lines lower.
X     * | -                  | To the first CHAR <*> lines higher.
X     * | + | <cr>           | To the first CHAR <*> lines lower.
X     - | 0                  | To the first char of the line.
X     * | |                  | To column <*> (<ht>: only to the endpoint).
X     * | f<char>            | <*> <char>s to the right (find).
X     * | t<char>            | Till before <*> <char>s to the right.
X     * | F<char>            | <*> <char>s to the left.
X     * | T<char>            | Till after <*> <char>s to the left.
X     * | ;                  | Repeat latest `f'|`t'|`F'|`T' <*> times.
X     * | ,                  | Idem in opposite direction.
X     * | w                  | <*> words forward.
X     * | W                  | <*> WORDS forward.
X     * | b                  | <*> words backward.
X     * | B                  | <*> WORDS backward.
X     * | e                  | To the end of word <*> forward.
X     * | E                  | To the end of WORD <*> forward.
X     * | G                  | Go to line <*> (default EOF).
X     * | H                  | To line <*> from top of the screen (home).
X     * | L                  | To line <*> from bottom of the screen (last).
X     - | M                  | To the middle line of the screen.
X     * | )                  | <*> sentences forward.
X     * | (                  | <*> sentences backward.
X     * | }                  | <*> paragraphs forward.
X     * | {                  | <*> paragraphs backward.
X     - | ]]                 | To the next section (default EOF).
X     - | [[                 | To the previous section (default begin of file).
X     - | `<a-z>             | To the mark.
X     - | '<a-z>             | To the first CHAR of the line with the mark.
X     - | ``                 | To the cursor position before the latest absolute
X                            | jump (of which are examples `/' and `G').
X     - | ''                 | To the first CHAR of the line on which the cursor
X                            | was placed before the latest absolute jump.
X     - | /<string>          | To the next occurrence of <string>.
X     - | ?<string>          | To the previous occurrence of <string>.
X     - | n                  | Repeat latest `/'|`?' (next).
X     - | N                  | Idem in opposite direction.
X     - | %                  | Find the next bracket and go to its match
X                            | (also with `{'|`}' and `['|`]').
XControl-L
X
X
X
X
X
X    /////////////////////////
X    / searching (see above) /
X    /////////////////////////
X
X    :ta <name>              | Search in the tags file where <name> is
X                            | defined (file, line), and go to it.
X    ^]                      | Use the name under the cursor in a `:ta' command.
X    :[x,y]g/<string>/<cmd>  | Search globally [from line x to y] for <string>
X                            | and execute the `ex' <cmd> on each occurrence.
X    :[x,y]v/<string>/<cmd>  | Execute <cmd> on the lines that don't match.
X
X    ///////////////////
X    / undoing changes /
X    ///////////////////
X
X    u                       | Undo the latest change.
X    U                       | Undo all changes on a line, while not having
X                            | moved off it (unfortunately).
X    :q!                     | Quit vi without writing.
X    :e!                     | Re-edit a messed-up file.
X
X    ///////////////////////////////////
X    / appending text (end with <esc>) /
X    ///////////////////////////////////
X
X     * | a                  | <*> times after the cursor.
X     * | A                  | <*> times at the end of line.
X     * | i                  | <*> times before the cursor (insert).
X     * | I                  | <*> times before the first CHAR of the line
X     * | o                  | On a new line below the current (open).
X                            | The count is only useful on a slow terminal.
X     * | O                  | On a new line above the current.
X                            | The count is only useful on a slow terminal.
X     * | ><move>            | Shift the lines described by <*><move> one
X                            | shiftwidth to the right (layout!).
X     * | >>                 | Shift <*> lines one shiftwidth to the right.
X     * | ["<a-z1-9>]p       | Put the contents of the (default undo) buffer
X                            | <*> times after the cursor.
X                            | A buffer containing lines is put only once,
X                            | below the current line.
X     * | ["<a-z1-9>]P       | Put the contents of the (default undo) buffer
X                            | <*> times before the cursor.
X                            | A buffer containing lines is put only once,
X                            | above the current line.
X     * | .                  | Repeat previous command <*> times.
X                            | If the last command before a `.' command
X                            | references a numbered buffer, the buffer number
X                            | is incremented first (and the count is ignored):
X                            |
X                            | "1pu.u.u.u.u      - `walk through' buffers 1
X                            |                     through 5
X                            | "1P....           - restore them
XControl-L
X
X
X
X
X
X    /////////////////
X    / deleting text /
X    /////////////////
X
X    Everything deleted can be stored into a buffer. This is achieved by
X    putting a `"' and a letter <a-z> before the delete command. The
X    deleted text will be in the buffer with the used letter. If <A-Z>
X    is used as buffer name, the adjugate buffer <a-z> will be augmented
X    instead of overwritten with the text. The undo buffer always
X    contains the latest change. Buffers <1-9> contain the latest 9
X    LINE deletions (`"1' is most recent).
X
X     * | x                  | Delete <*> chars under and after the cursor.
X     * | X                  | <*> chars before the cursor.
X     * | d<move>            | From begin to endpoint of <*><move>.
X     * | dd                 | <*> lines.
X     - | D                  | The rest of the line.
X     * | <<move>            | Shift the lines described by <*><move> one
X                            | shiftwidth to the left (layout!).
X     * | <<                 | Shift <*> lines one shiftwidth to the left.
X     * | .                  | Repeat latest command <*> times.
X
X    //////////////////////////////////
X    / changing text (end with <esc>) /
X    //////////////////////////////////
X
X     * | r<char>            | Replace <*> chars by <char> - no <esc>.
X     * | R                  | Overwrite the rest of the line,
X                            | appending change <*> - 1 times.
X     * | s                  | Substitute <*> chars.
X     * | S                  | <*> lines.
X     * | c<move>            | Change from begin to endpoint of <*><move>.
X     * | cc                 | <*> lines.
X     * | C                  | The rest of the line and <*> - 1 next lines.
X     * | =<move>            | If the option `lisp' is set, this command
X                            | will realign the lines described by <*><move>
X                            | as though they had been typed with the option
X                            | `ai' set too.
X     - | ~                  | Switch lower and upper cases.
X     * | J                  | Join <*> lines (default 2).
X     * | .                  | Repeat latest command <*> times (`J' only once).
X     - | &                  | Repeat latest `ex' substitute command, e.g.
X                            | `:s/wrong/good'.
X     - | :[x,y]s/<p>/<r>/<f>| Substitute (on lines x through y) the pattern
X                            | <p> (default the last pattern) with <r>.  Useful
X                            | flags <f> are `g' for `global' (i.e. change every
X                            | non-overlapping occurrence of <p>) and `c' for
X                            | `confirm' (type `y' to confirm a particular
X                            | substitution, else <cr>).  Instead of `/' any
X                            | punctuation CHAR unequal to <lf> can be used as
X                            | delimiter.
XControl-L
X
X
X
X
X
X    ///////////////////////////////////
X    / substitute replacement patterns /
X    ///////////////////////////////////
X
X    The basic meta-characters for the replacement pattern are `&' and `~';
X    these are given as `\&' and `\~' when nomagic is set.  Each instance
X    of `&' is replaced by the characters which the regular expression
X    matched.  The meta-character `~' stands, in the replacement
X    pattern, for the defining text of the previous replacement
X    pattern.  Other meta-sequences possible in the replacement pattern
X    are always introduced by the escaping character `\'.  The sequence
X    `\n' (with `n' in [1-9]) is replaced by the text matched by the
X    n-th regular subexpression enclosed between `\(' and `\)'.  The
X    sequences `\u' and `\l' cause the immediately following character
X    in the replacement to be converted to upper- or lower-case
X    respectively if this character is a letter.  The sequences `\U' and
X    `\L' turn such conversion on, either until `\E' or `\e' is
X    encountered, or until the end of the replacement pattern.
X
X    //////////////////////////////
X    / remembering text (yanking) /
X    //////////////////////////////
X
X    With yank commands you can put `"<a-z>' before the command, just as
X    with delete commands. Otherwise you only copy to the undo buffer.
X    The use of buffers <a-z> is THE way of copying text to another
X    file; see the `:e <file>' command.
X
X     * | y<move>            | Yank from begin to endpoint of <*><move>.
X     * | yy                 | <*> lines.
X     * | Y                  | Idem (should be equivalent to `y$' though).
X     - | m<a-z>             | Mark the cursor position with a letter.
X
X    ////////////////////////////////////////
X    / commands while in append|change mode /
X    ////////////////////////////////////////
X
X    ^@                      | If typed as the first character of the
X                            | insertion, it is replaced with the previous
X                            | text inserted (max. 128 chars), after which
X                            | the insertion is terminated.
X    ^V                      | Deprive the next char of its special meaning
X                            | (e.g. <esc>).
X    ^D                      | One shiftwidth to the left.
X    0^D                     | Remove all indentation on the current line
X                            | (there must be no other chars on the line).
X    ^^D                     | Idem, but it is restored on the next line.
X    ^T                      | one shiftwidth to the right
X    ^H | <erase>            | One char back.
X    ^W                      | One word back.
X    <kill>                  | Back to the begin of the change on the
X                            | current line.
X    <intr>                  | like <esc>.
XControl-L
X
X
X
X
X
X    /////////////////////////////////////////////////
X    / writing, editing other files, and quitting vi /
X    /////////////////////////////////////////////////
X
X    In `:' `ex' commands `%' denotes the current file, `#' is a synonym for
X    the alternate file (which normally is the previous file).
X    Marks can be used for line numbers too: '<a-z>.
X    In the `:w'|`:f'|`:cd'|`:e'|`:n' commands shell meta-characters can be
X    used.
X
X    :q                      | Quit vi, unless the buffer has been changed.
X    :q!                     | Quit vi without writing.
X    ^Z                      | Suspend vi.
X    :w                      | Write the file.
X    :w <name>               | Write to the file <name>.
X    :w >> <name>            | Append the buffer to the file <name>.
X    :w! <name>              | Overwrite the file <name>.
X    :x,y w <name>           | Write lines x through y to the file <name>.
X    :wq                     | Write the file and quit vi; some versions quit
X                            | even if the write was unsuccessful!
X                            | Use `ZZ' instead.
X    ZZ                      | Write if the buffer has been changed, and
X                            | quit vi.  If you have invoked vi with the `-r'
X                            | option, you'd better write the file
X                            | explicitly (`w' or `w!'), or quit the
X                            | editor explicitly (`q!') if you don't want
X                            | to overwrite the file - some versions of vi
X                            | don't handle the `recover' option very well.
X    :x [<file>]             | Idem [but write to <file>].
X    :x! [<file>]            | `:w![<file>]' and `:q'.
X    :pre                    | Preserve the file - the buffer is saved as if
X                            | the system had just crashed; for emergencies,
X                            | when a `:w' command has failed and you don't
X                            | know how to save your work (see `vi -r').
X    :f <name>               | Set the current filename to <name>.
X    :cd [<dir>]             | Set the working directory to <dir>
X                            | (default home directory).
X    :cd! [<dir>]            | Idem, but don't save changes.
X    :e [+<cmd>] <file>      | Edit another file without quitting vi - the
X                            | buffers are not changed (except the undo
X                            | buffer), so text can be copied from one file to
X                            | another this way.  [Execute the `ex' command
X                            | <cmd> (default `$') when the new file has been
X                            | read into the buffer.]  <cmd> must contain no
X                            | <sp> or <ht>.  See `vi startup'.
X    :e! [+<cmd>] <file>     | Idem, without writing the current buffer.
X    ^^                      | Edit the alternate (normally the previous) file.
X    :rew                    | Rewind the argument list, edit the first file.
X    :rew!                   | Idem, without writing the current buffer.
X    :n [+<cmd>] [<files>]   | Edit next file or specify a new argument list.
X    :n! [+<cmd>] [<files>]  | Idem, without writing the current buffer.
X    :args                   | Give the argument list, with the current file
X                            | between `[' and `]'.
XControl-L
X
X
X
X
X
X    ////////////////////
X    / display commands /
X    ////////////////////
X
X    ^G                      | Give file name, status, current line number
X                            | and relative position.
X    ^L                      | Refresh the screen (sometimes `^P' or `^R').
X    ^R                      | Sometimes vi replaces a deleted line by a `@',
X                            | to be deleted by `^R' (see option `redraw').
X    [*]^E                   | Expose <*> more lines at bottom, cursor
X                            | stays put (if possible).
X    [*]^Y                   | Expose <*> more lines at top, cursor
X                            | stays put (if possible).
X    [*]^D                   | Scroll <*> lines downward
X                            | (default the number of the previous scroll;
X                            | initialization: half a page).
X    [*]^U                   | Scroll <*> lines upward
X                            | (default the number of the previous scroll;
X                            | initialization: half a page).
X    [*]^F                   | <*> pages forward.
X    [*]^B                   | <*> pages backward (in older versions `^B' only
X                            | works without count).
X
X    If in the next commands the field <wi> is present, the windowsize
X    will change to <wi>. The window will always be displayed at the
X    bottom of the screen.
X
X    [*]z[wi]<cr>            | Put line <*> at the top of the window
X                            | (default the current line).
X    [*]z[wi]+               | Put line <*> at the top of the window
X                            | (default the first line of the next page).
X    [*]z[wi]-               | Put line <*> at the bottom of the window
X                            | (default the current line).
X    [*]z[wi].               | Put line <*> in the centre of the window
X                            | (default the current line).
XControl-L
X
X
X
X
X
X    ////////////////////////////
X    / mapping and abbreviation /
X    ////////////////////////////
X
X    When mapping take a look at the options `to' and `remap' (below).
X
X    :map <string> <seq>     | <string> is interpreted as <seq>, e.g.
X                            | `:map ^C :!cc %^V<cr>' to compile from within vi
X                            | (vi replaces `%' with the current file name).
X    :map                    | Show all mappings.
X    :unmap <string>         | Deprive <string> of its mapping.  When vi
X                            | complains about non-mapped macros (whereas no
X                            | typos have been made), first do something like
X                            | `:map <string> Z', followed by `:unmap <string>'
X                            | (`Z' must not be a macro itself), or switch to
X                            | `ex' mode first with `Q'.
X    :map! <string> <seq>    | Mapping in append mode, e.g.
X                            | `:map! \be begin^V<cr>end;^V<esc>O<ht>'.
X                            | When <string> is preceded by `^V', no
X                            | mapping is done.
X    :map!                   | Show all append mode mappings.
X    :unmap! <string>        | Deprive <string> of its mapping (see `:unmap').
X    :ab <string> <seq>      | Whenever in append mode <string> is preceded and
X                            | followed by a breakpoint (e.g. <sp> or `,'), it
X                            | is interpreted as <seq>, e.g. `:ab p procedure'.
X                            | A `^V' immediately following <string> inhibits
X                            | expansion.
X    :ab                     | Show all abbreviations.
X    :unab <string>          | Do not consider <string> an abbreviation
X                            | anymore (see `:unmap').
X    @<a-z>                  | Consider the contents of the named register a
X                            | command, e.g.:
X                            |       o0^D:s/wrong/good/<esc>"zdd
X                            | Explanation:
X                            |       o              - open a new line
X                            |       0^D            - remove indentation
X                            |       :s/wrong/good/ - this input text is an
X                            |                        `ex' substitute command
X                            |       <esc>          - finish the input
X                            |       "zdd           - delete the line just
X                            |                        created into register `z'
X                            | Now you can type `@z' to substitute `wrong'
X                            | with `good' on the current line.
X    @@                      | Repeat last register command.
XControl-L
X
X
X
X
X
X    /////////////////////////////
X    / switch and shell commands /
X    /////////////////////////////
X
X    Q | ^\ | <intr><intr>   | Switch from vi to `ex'.
X    :                       | An `ex' command can be given.
X    :vi                     | Switch from `ex' to vi.
X    :sh                     | Execute a subshell, back to vi by `^D'.
X    :[x,y]!<cmd>            | Execute a shell <cmd> [on lines x through y;
X                            | these lines will serve as input for <cmd> and
X                            | will be replaced by its standard output].
X    :[x,y]!! [<args>]       | Repeat last shell command [and append <args>].
X    :[x,y]!<cmd> ! [<args>] | Use the previous command (the second `!') in a
X                            | new command.
X    [*]!<move><cmd>         | The shell executes <cmd>, with as standard
X                            | input the lines described by <*><move>,
X                            | next the standard output replaces those lines
X                            | (think of `cb', `sort', `nroff', etc.).
X    [*]!<move>!<args>       | Append <args> to the last <cmd> and execute it,
X                            | using the lines described by the current
X                            | <*><move>.
X    [*]!!<cmd>              | Give <*> lines as standard input to the
X                            | shell <cmd>, next let the standard output
X                            | replace those lines.
X    [*]!!! [<args>]         | Use the previous <cmd> [and append <args> to it].
X    :x,y w !<cmd>           | Let lines x to y be standard input for <cmd>
X                            | (notice the <sp> between `w' and `!').
X    :r!<cmd>                | Put the output of <cmd> onto a new line.
X    :r <name>               | Read the file <name> into the buffer.
XControl-L
X
X
X
X
X
X    //////////////
X    / vi startup /
X    //////////////
X
X    vi [<files>]            | Edit the files, start with the first page of
X                            | the first file.
X
X    The editor can be initialized by the shell variable `EXINIT', which
X    looks like:
X
X            EXINIT='<cmd>|<cmd>|...'
X            <cmd>: set options
X                   map ...
X                   ab ...
X            export EXINIT (in the Bourne shell)
X
X    However, the list of initializations can also be put into a file.
X    If this file is located in your home directory, and is named `.exrc'
X    AND the variable `EXINIT' is NOT set, the list will be executed
X    automatically at startup time. However, vi will always execute the
X    contents of a `.exrc' in the current directory, if you own the file.
X    Else you have to give the execute command yourself:
X
X            :source file
X    or
X            :so file
X
X    On-line initializations can be given with `vi +<cmd> file', e.g.:
X
X    vi +x file              | The cursor will immediately jump to line x
X                            | (default last line).
X    vi +/<string> file      | ~ to the first occurrence of <string>.
X
X    You can start at a particular tag with:
X
X    vi -t <tag>             | Start in the right file in the right place.
X
X    Sometimes (e.g. if the system crashed while you were editing) it is
X    possible to recover files lost in the editor by `vi -r file'.  If
X    you just want to view a file by using vi, and you want to avoid any
X    change, instead of vi you can use the `view' or `vi -R' command:
X    the option `readonly' will be set automatically (with `:w!' you can
X    override this option).
XControl-L
X
X
X
X
X
X    //////////////////////////////
X    / the most important options /
X    //////////////////////////////
X
X    ai                      | autoindent - In append mode after a <cr> the
X                            | cursor will move directly below the first
X                            | CHAR on the previous line.  However, if the
X                            | option `lisp' is set, the cursor will align
X                            | at the first argument to the last open list.
X    aw                      | autowrite - Write at every shell escape.
X                            | (useful when compiling from within vi)
X    dir=<string>            | directory - The directory for vi to make
X                            | temporary files (default `/tmp').
X    eb                      | errorbells - Beeps when you goof
X                            | (not on every terminal).
X    ic                      | ignorecase - No distinction between upper and
X                            | lower cases when searching.
X    lisp                    | Redefine the following commands:
X                            | `(', `)'   - move backward (forward) over
X                            |              S-expressions
X                            | `{', `}'   - idem, but don't stop at atoms
X                            | `[[', `]]' - go to previous (next) line
X                            |              beginning with a `('
X                            | See option `ai'.
X    list                    | <lf> is shown as `$', <ht> as `^I'.
X    magic                   | If this option is set (default), the chars `.',
X                            | `[' and `*' have special meanings within search
X                            | and `ex' substitute commands.  To deprive such a
X                            | char of its special function it must be preceded
X                            | by a `\'.  If the option is turned off it's just
X                            | the other way around.  Meta-chars:
X                            | ^<string>    - <string> must begin the line
X                            | <string>$    - <string> must end the line
X                            | .            - matches any char
X                            | [a-z]        - matches any char in the range
X                            | [<string>]   - matches any char in <string>
X                            | [^<string>]  - matches any char not in <string>
X                            | <char>*      - 0 or more <char>s
X                            | \<<string>\> - <string> must be a word
X    nu                      | number - Numbers before the lines.
X    para=<string>           | paragraphs - Every pair of chars in <string> is
X                            | considered a paragraph delimiter nroff macro
X                            | (for `{' and `}').  A <sp> preceded by a `\'
X                            | indicates the previous char is a single letter
X                            | macro.  `:set para=P\ bp' introduces `.P' and
X                            | `.bp' as paragraph delimiters.  Empty lines and
X                            | section boundaries are paragraph boundaries too.
X    redraw                  | The screen remains up to date.
X    remap                   | If on (default), macros are repeatedly
X                            | expanded until they are unchanged.
X                            | Example: if `o' is mapped to `A', and `A'
X                            | is mapped to `I', then `o' will map to `I'
X                            | if `remap' is set, else it will map to `A'.
X    report=<*>              | Vi reports whenever e.g. a delete
X                            | or yank command affects <*> or more lines.
X    ro                      | readonly - The file is not to be changed.
X                            | However, `:w!' will override this option.
XControl-L
X
X
X
X
X
X    sect=<string>           | sections - Gives the section delimiters (for `[['
X                            | and `]]'); see option `para'. A `{' beginning a
X                            | line also starts a section (as in C functions).
X    sh=<string>             | shell - The program to be used for shell escapes
X                            | (default `$SHELL' (default `/bin/sh')).
X    sw=<*>                  | shiftwidth - Gives the shiftwidth (default 8
X                            | positions).
X    sm                      | showmatch - Whenever you append a `)', vi shows
X                            | its match if it's on the same page; also with
X                            | `{' and `}'.  If there's no match, vi will beep.
X    terse                   | Short error messages.
X    to                      | timeout - If this option is set, append mode
X                            | mappings will be interpreted only if they're
X                            | typed fast enough.
X    ts=<*>                  | tabstop - The length of a <ht>; warning: this is
X                            | only IN the editor, outside of it <ht>s have
X                            | their normal length (default 8 positions).
X    wa                      | writeany - No checks when writing (dangerous).
X    warn                    | Warn you when you try to quit without writing.
X    wi=<*>                  | window - The default number of lines vi shows.
X    wm=<*>                  | wrapmargin - In append mode vi automatically
X                            | puts a <lf> whenever there is a <sp> or <ht>
X                            | within <wm> columns from the right margin.
X    ws                      | wrapscan - When searching, the end is
X                            | considered `stuck' to the begin of the file.
X
X    :set <option>           | Turn <option> on.
X    :set no<option>         | Turn <option> off.
X    :set <option>=<value>   | Set <option> to <value>.
X    :set                    | Show all non-default options and their values.
X    :set <option>?          | Show <option>'s value.
X    :set all                | Show all options and their values.
X
X
X    /////////////////
X    / contributions /
X    /////////////////
X
X    Maarten Litmaath <maart at cs.vu.nl>
X    Rich Salz <rsalz at bbn.com>
X    Eamonn McManus <emcmanus at cs.tcd.ie>
X    Diomidis Spinellis <diomidis%ecrcvax.uucp at pyramid.pyramid.com>
X    Blair P. Houghton <bph at buengc.bu.edu>
X    Rusty Haddock <{uunet,att,rutgers}!mimsy.umd.edu!fe2o3!rusty>
X    Panos Tsirigotis <panos at boulder.colorado.edu>
X    David J. MacKenzie <djm at wam.umd.edu>
X    Kevin Carothers <kevin at ttidca.tti.com>
X    Dan Mercer <mercer at ncrcce.StPaul.NCR.COM>
X
X    Patchlevel: 6
+ END-OF-FILE vi.ref.6
chmod 'u=rw,g=r,o=r' 'vi.ref.6'
set `wc -c 'vi.ref.6'`
count=$1
case $count in
30846)	:;;
*)	echo 'Bad character count in ''vi.ref.6' >&2
		echo 'Count should be 30846' >&2
esac
exit 0
-- 
   Did Andy Tanenbaum get his programming   |Maarten Litmaath @ VU Amsterdam: 
instruction from a Cereal box?  (Sam McCrea)|maart at cs.vu.nl, mcvax!botter!maart

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

From: "Dr. T. Andrews" <tanner at cdis-1.uucp>
Subject: Re: Reversing a file?
Date: 5 Oct 89 15:33:47 GMT
To:       info-unix at sem.brl.mil

itkin at mrspoc.Transact.COM (Steven M. List) writes:
) 	echo "g/./.m0\nw $OUTPUT\nq" | ex $INPUT
) 	:g/./.m0
Very clever, but does not deal effectively with zero-lentgh lines.
In "vi", try the following (similar change for echo command above)
	:g/^/.m0
-- 
He cuts half of passenger service | {bpa,uunet}!cdin-1!cdis-1!tanner
Mulroney: "cold froze our brains" | {attctc gatech!uflorida}!ki4pv!cdis-1!tanner

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


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



More information about the Comp.unix.questions mailing list