Problem using multiple 'head' commands in shell script

Martin Weitzel martin at mwtech.UUCP
Fri Feb 1 10:23:30 AEST 1991


In article <1678 at abekrd.UUCP> garyb at abekrd.UUCP (Gary Bartlett) writes:
[...]
:*** FLASH OF INSPIRATION ***
:
:I have an idea:
:- Process the original file by putting the line number at the beginning of
:  each line,

Good.

:- Process the file to be merged so that the merge points are at the beginning
:  of each of these lines,

Good.

:- Cat the two processed files together and pass through 'sort',

Depending on how the lines look like it may also be possible to use
join(1).

:- Remove line numbers from beginning of resulting file, QED

and split the joined lines.
-- 
Martin Weitzel, email: martin at mwtech.UUCP, voice: 49-(0)6151-6 56 83



More information about the Comp.unix.shell mailing list