Scripting Question

Hal Burgiss hal at burgiss.net
Fri Feb 20 11:30:22 UTC 2009


On Fri, Feb 20, 2009 at 12:11:30AM -0800, Patton Echols wrote:
> 
> As an aside, I manually cleaned out the few duplicate lines in the 
> result.   I am going to read 'man gawk' to see if I could figure out how 
> to clean duplicates automatically.


If the entire line is duplicated ...

 sort $file |uniq > $newfile

That will likely screw the header line so I would strip that first,
and then re-insert it.


-- 
Hal





More information about the ubuntu-users mailing list