Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxx.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!ihuxx!ignatz
From: ignatz@ihuxx.UUCP (Dave Ihnat, Chicago, IL)
Newsgroups: net.unix,net.unix-wizards,net.micro
Subject: OPINION REQUEST: How do you want 'paste' to behave?
Message-ID: <814@ihuxx.UUCP>
Date: Mon, 13-Aug-84 19:01:45 EDT
Article-I.D.: ihuxx.814
Posted: Mon Aug 13 19:01:45 1984
Date-Received: Tue, 14-Aug-84 02:48:33 EDT
Organization: AT&T Bell Labs, Naperville, IL
Lines: 79

Hello, folks.  Having recently finished 'cut', I've decided to go
on and do the companion command, 'paste'.  Where 'cut' disassembles
a file, 'paste'--predictably--will put files together in one file.

For instance, if you have two files, file1 and file2; file1 contains

File1,line 1
File1,line 2
File1,line 3
File1,line 4
File1,line 5

and file2 contains

File2,line 1
File2,line 2
File2,line 3
File2,line 4
File2,line 5

Then, if you ran the command "paste file1 file2 >file.both", file.both
will contain:

File1,line 1 File2,line 1
File1,line 2 File2,line 2
File1,line 3 File2,line 3
File1,line 4 File2,line 4
File1,line 5 File2,line 5

with the lines separated by a 'tab' by default.

The problem, for me, comes with the old question:  How closely do I
emulate the behavior of the original command?  You see, I've
encountered what appears to be a bug that's never been fixed (What? In
a Unix(Tm) command?? How extraordinary!!).  Unfortunately, it lives in
that funny realm of bugs that someone may use for some reason.

One of the 'paste' options, '-s', replaces the function of an *old*
command of the same name, which simply joined all the lines of a file.
This, 'paste -s file1 >filex' would result in a filex that looks
like:

File1,line 1 File1,line 2 File1,line 3 File1,line 4 File1,line 5

with each of the old lines 'tab' separated, and a newline at the end.
(Think of doing a series of 'J' commands in vi--the effect is
similar.)  Problem?  Simply that the manual documents that you can
invoke the last form as 'paste -s file1 file2 ...', that is, stating
explicitly that you may paste together several files.  For the command
'paste -s file1 file2 file3 >file.out' You would, then, expect an output
like (assume files like 'file1' and 'file2' above, but only three lines):

File1,line 1 File1,line 2 File1,line 3
File2,line 1 File2,line 2 File2,line 3
File3,line 1 File3,line 2 File3,line 3

What you *actually* get, however, is:

File1,line 1 File1,line 2 File1,line 3
File1,line 1 File1,line 2 File1,line 3
File2,line 1 File2,line 2 File2,line 3
File1,line 1 File1,line 2 File1,line 3
File2,line 1 File2,line 2 File2,line 3
File3,line 1 File3,line 2 File3,line 3

This looks, to me, like someone forgot to reset a buffer pointer for
multiple files.  BUT:  Do I fix the bug in the version I'm going to
release?  Or do I keep it, so that I look like the Unix version?

How about it, old Unix hands?  Did anyone ever use this behavior?
What do you want?

Sorry if this is long-winded, but I couldn't think of how to explain
it in any more abbreviated manner.  Please respond by mail; any flames,
of course, go to /dev/fireplace.  I'll make my decision within a
couple of weeks.

Dave Ihnat
ihuxx!ignatz