GNU bug report logs - #22001
Is it possible to tab separate concatenated files?

Previous Next

Package: coreutils;

Reported by: "Macdonald, Kim - BCCDC" <kim.macdonald <at> bccdc.ca>

Date: Mon, 23 Nov 2015 21:03:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 22001 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: "Macdonald, Kim - BCCDC" <kim.macdonald <at> bccdc.ca>, 22001 <at> debbugs.gnu.org
Subject: Re: bug#22001: Is it possible to tab separate concatenated files?
Date: Mon, 23 Nov 2015 17:02:44 -0500
tag 22001 notabug
close 22001
stop

Hello Kim,

On 11/23/2015 03:50 PM, Macdonald, Kim - BCCDC wrote:
> I’m just looking at the options for the cat command – I see there’s a
> way to ignore tabs when they exist – but is there a way to tab
> separate the files you’re concatenating with the cat command?

It is unclear (to me) what you're trying to achieve - could provide a bit more details (perhaps a short example) ?

If you have a file (one file) with spaces and you wish to convert them to tabs, consider the 'expand' command (then pipe to 'cat' if needed).

If you have multiple files and you wish to print them side-by-side, separated by tabs (as opposed to one-after-the-other, as with 'cat'),
consider using 'paste':

  $ cat 1.txt
  a
  b
  c
  d

  $ cat 2.txt
  1
  2
  3
  4

  $ cat 3.txt
  w
  x
  y
  z

  $ paste 1.txt 2.txt 3.txt
  a	1	w
  b	2	x
  c	3	y
  d	4	z

regards,
 - assaf





This bug report was last modified 6 years and 263 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.