1 2 3 4 5 6 7 8 9 10 11 12
: NAME="$1" sed ' 1i\ static char *XXXX="\\n s/"/\\"/g s/\\n/\\\\n/g s/$/\\n/ $a\ \" ' | sed "s/XXXX/$NAME/" | awk '{printf("%s", $0)};END{printf(";\n")}'