What is a smart way to delete lines from a CSV file in ruby โโwhere a specific value exists on a specific line?
Here is an example file:
350 lbs., Outrigger Footprint, 61" x 53", Weight, 767 lbs., 300-2080 350 lbs., Outrigger Footprint, 61" x 53", Weight, 817 lbs., 300-2580 350 lbs., Outrigger Footprint, 61" x 53", Weight, 817 lbs., 300-2580 350 lbs., Outrigger Footprint, 69" x 61", Weight, 867 lbs., 300-3080 350 lbs., Outrigger Footprint, 69" x 61", Weight, 867 lbs., 300-3080
Ideally, I need a new file created with just this:
350 lbs., Outrigger Footprint, 61" x 53", Weight, 767 lbs., 300-2080 350 lbs., Outrigger Footprint, 61" x 53", Weight, 817 lbs., 300-2580 350 lbs., Outrigger Footprint, 69" x 61", Weight, 867 lbs., 300-3080
if indicated:
300-2580 300-3080 300-2080
so I know I can do this with sort filename|uniq -d , but I'm trying to learn Ruby (somewhat painfully).
Thanks in advance, M