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 _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils