1#!/bin/sh 2 3prog=$(basename $0) 4usage() 5{ 6 echo "usage: ${prog} symbol" 1>&2 7 exit 1 8} 9 10if [ $# -ne 1 ]; then 11 usage 12fi 13 14sed 's/\(["\]\)/\\\1/g' | \ 15${AWK:-awk} -v sym=$1 ' 16BEGIN { printf "const char " sym "[] = \""; } 17 { printf $0 "\\n"; } 18END { print "\";"; }' 19 20exit 0 21