5
1
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.
and paste
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
I get
$ 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 ?
@RichardHoskins In my opinion that's good enough to be an answer. Thanks! – isomorphismes – 2014-08-13T22:22:10.997
4They are redundant in scope. lam was part of BSD, paste AT&T. paste was later standardized in POSIX.2. lam hangs around for hysterical reasons. TIMTOWTDI – Richard Hoskins – 2009-07-29T17:18:08.480