bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paste documentation immprovment


From: Jim Meyering
Subject: Re: paste documentation immprovment
Date: Thu, 11 Apr 2002 15:23:33 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i686-pc-linux-gnu)

Dan Jacobson <address@hidden> 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 (address@hidden)
> 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 <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]