Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
sed - delete duplicate lines
Name: snomys Date: August 2, 2006 at 05:06:30 Pacific OS: win nt CPU/Ram: pentium 4/256 Product: IBM
Comment:
ive tried all the possibilties on the sed one liners sites, and tried everything mysefl, but i cant figure it out...
ive got a file, containing duplicate lines, like this
delete from itm.tb_wf_objects where alert_id = 51573 delete from itm.tb_wf_objects where alert_id = 51597 delete from itm.tb_wf_objects where alert_id = 51617 delete from itm.tb_wf_objects where alert_id = 51617
as you can see alert id 51617 appears twice, i want to rmeove all lines that have the same alert_ids. table names can change as well.
Summary: URGENT HELP NEEDED... I need to know how to delete duplicate lines from a pipe delimited file (ksh). it should check only the 1st field for any duplicate entries & if finds any should delete those dup...
Summary: Anybody know how to get sed to delete lines up to (but not including) a certain line? To delete all up to and including the line, I use 1,/whatever/d in the sed script. But I don't want to dele...
Summary: How do i delete first line of a file. The file starts with page break ^L. The first line contains the page break ^L. The file may have multiple pagebreaks and I don't want to delete from the file. I ...