diff options
Diffstat (limited to 'usr.sbin/crunch/crunchgen/mkskel.sh')
-rw-r--r-- | usr.sbin/crunch/crunchgen/mkskel.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.sbin/crunch/crunchgen/mkskel.sh b/usr.sbin/crunch/crunchgen/mkskel.sh new file mode 100644 index 0000000..fd53d78 --- /dev/null +++ b/usr.sbin/crunch/crunchgen/mkskel.sh @@ -0,0 +1,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 |