bug#22001: Is it possible to tab separate concatenated files?
From:
Assaf Gordon
Subject:
bug#22001: Is it possible to tab separate concatenated files?
Date:
Mon, 23 Nov 2015 17:02:44 -0500
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
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