summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch/crunchgen/mkskel.sh
blob: fd53d78bbbac871ee8987d2d3329ce8acfbedfd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh
# idea and sed lines taken straight from flex

cat <<!EOF
/* File created via mkskel.sh */

char *crunched_skel[] = {
!EOF

sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/  "&",/'

cat <<!EOF
  0
};
!EOF
OpenPOWER on IntegriCloud