Re: paste documentation immprovment

Jim Meyering <[email protected]>
Newsgroups gmane.comp.gnu.textutils.bugs
Message-ID <[email protected]>
Dan Jacobson <[email protected]> wrote:
> Gee, I sure wish the GNU paste documentation mentioned a little of this.
> Wonder where she learned all this.  Wasn't from Info.
>
> From: laura fairhead ([email protected])
> Subject: Re: print line 1 of each file, line 2 of each file...
> Newsgroups: comp.unix.shell
>
> On 07 Apr 2002 23:30:53 +0800, Dan Jacobson <[email protected]> wrote:
>
>>How do I print
>>
>>Line 1 of file A
>>Line 1 of file B
>>Line 1 of file C
>>
>>Line 2 of file A
>>Line 2 of file B
>>Line 2 of file C
>>...?
>>
>>Currently I use
>>paste -d X A B C|awk '{gsub("X","\n");print;print ""}'
>>but I feel like a jerk.
>
> You can use the special deliminator \n to make each line
> seperated by a newline, then as your last file just use
> the NUL device so that an extra newline gets appended;
>
> paste -d '\n' A B C /dev/null
>
> Other useful standard special deliminators in the 'paste'
> command are \t and \0.

Thanks for the suggestion.
If you feel like writing that up and sending a patch
to coreutils.texi, I'll be happy to accept it.
The latest version of coreutils.texi is here:

  ftp://alpha.gnu.org/gnu/fetish/fileutils-4.1.8.tar.gz
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.