Lum – Join multiple files in a directory column wise

columnstext processing

I would like to join about 100 files in the same directory column-wise. I have tried

  paste file1 file2 | column -s $'\t' -t

This works fine for 2 files. But when I try to do it for 100 files, I get an error saying

 column: line too long

Could someone please help where I am going wrong?

Best Answer

You don't have any errors. It's the limit of input line length, in bytes, define by column.

#define MAXLINELEN  (LINE_MAX + 1)

LINE_MAX is defined in posix2_lim.h, part of GNU C library:

/* The maximum length, in bytes, of an input line.  */                          
#define _POSIX2_LINE_MAX        2048
.....
#ifndef LINE_MAX                                                                
#define LINE_MAX        _POSIX2_LINE_MAX

Note

Related Question