I don't get the difference between the program lam
lam -- laminate files
The lam utility copies the named files side by side onto the standard output. The n-th input lines from the input files are considered fragments of the single long n-th output line into which they are assembled. The name `-' means the standard input, and may be repeated.
paste -- merge corresponding or subsequent lines of files
The paste utility concatenates the corresponding lines of the given input files, replacing all but the last file's newline characters with a single tab character, and writes the resulting lines to standard output. If end-of-file is reached on an input file while other input files still contain data, the file is treated as if it were an endless source of empty lines.
Except for the command options. I don't get the difference. Suppose I have two files a and b
a ------------ 1 2 3 b ------------ 4 5 6
$ paste -d ',' a b 1,4 2,5 3,6 $ lam a -s',' b 1,4 2,5 3,6
They seem redundant in scope, although lam seems to be more flexible. The descriptions do not allow me to catch cases where they could behave differently. Does anybody have a clue ?