#!/bin/bash INPUT=${1:-input} echo "#include " echo "" printf "const char INPUT[] = " while IFS= read -r line; do echo " \"$line\"" done < $INPUT unset line echo ";" echo "const size_t INPUT_SIZE=sizeof(INPUT)/sizeof(char);"