Re: Patch Problemo

From: Kenneth G. Cavness (stargoat@mids.org)
Date: 07/13/96


[Newbie material. Seasoned UNIX type personas need not apply.]

On Sat, 13 Jul 1996, Casper Lund wrote:

> On Fri, 12 Jul 1996 16:38:54 -0500 (CDT), you wrote:
> 
> >Okay, call me stupid, but I have not much experience with diff files.
> >I am trying to add the autoeq.patch, the latest version from jhu.
> >What is the command I type to intitate the patch? The man page for patch
> >was non-specific.
> >
> >I tried patch > autoeq.patch but this was not working.
> 
> "patch < autoeq.patch" will do wonders ;)
> Make sure that patch hasn't piped screen output into the patch-file
> thou', else you'll get some errors/warnings

Some other information you might find useful:

In UNIX, there are three devices commonly assigned from the beginning.
STDIN, STDOUT, and STDERR (standard input, standard output, and standard
error). STDIN usually reads from the tty (which is the terminal), STDOUT
usually prints out to the tty, and standard error usually prints out to
the tty, but is kept separate from STDOUT mainly so that one can get rid
of the error messages if they want to.

You don't have to have them do this, though. There are ways, called
redirection, to reassign input and output.

the '>' symbol will reassign STDOUT to a file. This is useful when you
want to log the results of a program for viewing or processing later.

For example,

		bin/circle -r -m -s -q 4500 > test.syslog

the '<' symbol will reassign STDIN to read input one line at a time from
a file. This is useful when you have a program that reads lines from the
terminal and may have tedious or lengthy things you wish done with it that
are best kept in a file.

For example,

		patch < oceania.patch

In csh and its variants, using the ">&" symbol will reassign STDERR to a
file. This is useful when you want, of course, to see the errors that a
file has generated. This is only useful when the person that wrote the
program has had the presence of mind to write errors to STDERR and not
STDOUT. In sh, the Korn shell, and their variants, I believe it's "2>".

One other method of redirection assigns both STDIN and STDOUT at the
same time. This is piping. To pipe, you 'connect' one command and another
with the "|" symbol. This causes the output of the first command to become
the input of the second command.

For example,

		bin/purgeplay lib/misc/players | grep 'StarGoat'

Hope this has helped. For more information, see your nearest library or
book store on rudimentary UNIX. You should do this, and know UNIX, before
you attempt to begin a MUD.


--
Kenneth G. Cavness                  |   http://www.mids.org/~stargoat
Assistant Editor                    |   http://ccwf.cc.utexas.edu/~cavness
Matrix Information and 		    |	ph#: 1-512-451-7602 fax: 452-0127
Directory Services	            |   Austin, TX



This archive was generated by hypermail 2b30 : 12/07/00 PST