I’m trying write a script in awk that (among other things) replaces all instances of double quotes with two consecutive double quotes. But for some reason, I can’t seem to escape my double quotes properly.
So for instance:
Mary had a "little" lamb
would become
Mary had a ""little"" lamb
Thanks kindly!
You can do it like this:
Output:
The
1at the end invokes awk’s default block{ print $0 }.It’s even shorter with sed: