xref: /freebsd/usr.sbin/crunch/crunchgen/mkskel.sh (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1#! /bin/sh
2# idea and sed lines taken straight from flex
3
4cat <<!EOF
5/* File created via mkskel.sh */
6
7extern const char *crunched_skel[];
8const char *crunched_skel[] = {
9!EOF
10
11sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/  "&",/'
12
13cat <<!EOF
14  0
15};
16!EOF
17