do shell script "cat " & (quoted form of POSIX path of tmpNoteContentPath) & " | perl -pe 's|" & searchPattern & "|`cat " & quoted form of POSIX path of tmpAttachmentB64FilePath & "`|gme' | pbcopy && pbpaste > " & (quoted form of POSIX path of tmpNoteContentPath)