> Here's a starting point. What's a more optimal way to perform > this task? :-) > > sed 's#[^,]*##g' input.txt | tr -d '\n' | wc -m
For starters, remount the partition containing input.txt with the noatime option and disable trackerd. :) Then, change the '*' to a '\+' in your regex. This saved about 30% CPU time on a 2Mb sample. - Rog -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html