#!/usr/bin/awk -f # # In preparation for replacing all my netSnapShot icon links with atpic.com links, # any time there's a netSnapShot link, insert a comment line with that link. # I still want to have the old link s around in case atpic barfs or dies. # # Brent Chivers 2009/Aug/19 # # Typical lines look like this: # picked peonies on the windowsill # # Use '"' as the field separator. # Match netSnapShot.com regardless of upper/lower case. # The netSnapShot URL will be $2. Print it as a comment. # Print all lines. BEGIN { FS = "\"" } /[Ww][Ww][Ww].[Nn][Ee][Tt][Ss][Nn][Aa][Pp][Ss][Hh][Oo][Tt].[Cc][Oo][Mm]/ { printf ("\n", $2) } { print }