1

I have 2 text in different files file1 and file2. I need a command that takes file1 and file2 as arguments and print on terminal

This is text 1. This is              This is text 2. This is
text 1.This is text 1. This          text 2.This is text 2. This
is text 1. This is text 1.           is text 2. This is text 2. 
This is text 1.                      This is text 2.
1
  • vim -O file1 file2 -c 'windo set scb' Commented Oct 12, 2016 at 11:03

1 Answer 1

6

For columns of size 10 distant of 20 characters

paste <(fold file1 -w 10) <(fold file2 -sw 10)  | pr -t -e20
  • fold options

    • -w is the column width
    • -s avoid having separated words from line to line
  • pr options

    • -t leads to omit header and footer (date, time and page number)
    • -eN set N to be the number of spaces replacing the tab produced by paste

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .