[Ilugc] 1D1C - paste

  • From: tkdhanasekar@xxxxxxxxx (Dhana Sekar)
  • Date: Thu, 19 Sep 2013 21:37:42 +0530

command: paste
usage: merge lines of files

syntax: $ paste [OPTION]... [FILE]...

examples:

1. To print options and info of this command

    $ paste --help

2. To paste two files f1.txt and f2.txt

    $ cat  f1.txt
    a
    b
    c

    $ cat f2.txt

    1
    2
    3

    $ paste f1.txt f2.txt

    a  1
    b  2
    c  3

 3. To paste two files f1.txt and f2.txt with delimiters -d and
     serial -s

     $ paste -s -d : f1.txt f2.txt

     $ paste -s -d : f1.txt f2.txt

     a:b:c
     1:2:3


regards,
dhanasekar

Other related posts: