I'm interested in doing the equivalent of a horizontal "cat" on a bunch of files.
That is, instead of listing them one after another, I'd like them "cat"ted next to
each other horizontally (tab separated).
e.g.
file t1
0
1
2
file t2
10 15
11
12
13
14
file t3
20
21
% hcat t1 t2 t3
0 10 1
Bryan Harris wrote:
>
> I'm interested in doing the equivalent of a horizontal "cat" on a bunch of
> files. That is, instead of listing them one after another, I'd like them
> "cat"ted next to each other horizontally (tab separated).
>
>
> % hcat t1 t2 t3
> 0 10 15 20
> 1 11 21
> 2 1
Bryan Harris wrote:
>
> I'm interested in doing the equivalent of a horizontal "cat" on a bunch of
> files. That is, instead of listing them one after another, I'd like them
> "cat"ted next to each other horizontally (tab separated).
>
> e.g.
>
> file t1
> 0
> 1
> 2
>
> file t2
> 10 15
> 11
>
> Bryan Harris wrote:
>
> I'm interested in doing the equivalent of a horizontal "cat" on a
> bunch of files. That is, instead of listing them one after another,
> I'd like them "cat"ted next to each other horizontally (tab
separated).
>
> I'd like it to be able to work on any number of files, an
Paul wrote:
> One particular thing to watch -- most systems have a limit on how many
> filehandles a process can have open at a time. To see your max, (and as
> a template for another solution), try this:
>
> use FileHandle;
> while ($_ = new FileHandle ">deleteme") {
>push @_, $_;
>unlin
[stuff cut out]
>> I'd like it to be able to work on any number of files, and they might be
>> huge (20+ MB). I was thinking it'd be good to open up all the files at
>> once, and write out the new file one line at a time, but I can't figure
>> out how to set up an array of filehandles. I'm not
Bryan Harris wrote:
>
> Yes, I learned about paste today, very handy. Unfortunately paste doesn't
> always work right...
>
> t1
> 10 14
> 11 15
> 12
> 13
>
> t2
> 20 26
> 21 27
> 22
> 23
> 24
> 25
>
> % paste t*
> 10 14 20 26
> 11 15 21 27
> 12 22
> 13
Bryan Harris wrote:
> I'm interested in doing the equivalent of a horizontal "cat" on a
> bunch of files. That is, instead of listing them one after another,
> I'd like them "cat"ted next to each other horizontally (tab
> separated).
Hi Bryan.
This seemed kinda neat. Thanks to David for the data