On Fri, 2018-05-18 at 10:50 -0700, Joe Perches wrote: > and a trivial script to convert them all treewide > > $ git grep -P --name-only > '\b(?:seq_puts|seq_printf)\s*\(\s*[^,]+,\s*"(?:\\.|.)"\s*\)\s*;' | \ > xargs perl -i -e 'local $/; while (<>) { > s/\b(?:seq_puts|seq_printf)\s*\(\s*([^,]+),\s*"(\\.|.)"\s*\)\s*;/seq_putc(\1, > '"'\2'"')/g; print;}'
Hmm, pity this was missing a trailing semicolon in the substitution $ git grep -P --name-only '\b(?:seq_puts|seq_printf)\s*\(\s*[^,]+,\s*"(?:\\.|.)"\s*\)\s*;' | \ xargs perl -i -e 'local $/; while (<>) { s/\b(?:seq_puts|seq_printf)\s*\(\s*([^,]+),\s*"(\\.|.)"\s*\)\s*;/seq_putc(\1, '"'\2'"');/g; print;}'