4 lines
221 B
Bash
Executable file
4 lines
221 B
Bash
Executable file
#!/bin/bash
|
|
# convert text to C string suitable for printf
|
|
# usage: mksrcf file.htm [>file.cpp]
|
|
cat $1 | grep -v '^[[:space:]]*$' | sed -e 's:\\:\\\\:g' -e 's:":\\":g' -e 's:^\( *\): \1":' -e 's:$:\\n":' -e 's:%:%%:g'
|