1*11be35a1SLionel Sambuc#!/bin/sh 2*11be35a1SLionel Sambuc 3*11be35a1SLionel Sambucprog=$(basename $0) 4*11be35a1SLionel Sambucusage() 5*11be35a1SLionel Sambuc{ 6*11be35a1SLionel Sambuc echo "usage: ${prog} symbol" 1>&2 7*11be35a1SLionel Sambuc exit 1 8*11be35a1SLionel Sambuc} 9*11be35a1SLionel Sambuc 10*11be35a1SLionel Sambucif [ $# -ne 1 ]; then 11*11be35a1SLionel Sambuc usage 12*11be35a1SLionel Sambucfi 13*11be35a1SLionel Sambuc 14*11be35a1SLionel Sambucsed 's/\(["\]\)/\\\1/g' | \ 15*11be35a1SLionel Sambuc${AWK:-awk} -v sym=$1 ' 16*11be35a1SLionel SambucBEGIN { printf "const char " sym "[] = \""; } 17*11be35a1SLionel Sambuc { printf $0 "\\n"; } 18*11be35a1SLionel SambucEND { print "\";"; }' 19*11be35a1SLionel Sambuc 20*11be35a1SLionel Sambucexit 0 21