5

sed newbie scripting assistance

view full story
linux-howto

http://www.unix.com – Howdy folks, I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something. Here's a genericized version: A text_file (infile_grocery.txt) with these contents. Code: milk skim fruit apple banana milk skim fruit orange milk skim fruit mango milk skim fruit pomegranate milk 2 percent fruit cherry tomato milk 2 percent fruit peach milk whole fruit pineapple milk skim fruit strawberry raspberry milk skim fruit strawberry (HowTos)