#!/bin/bash version="0.1" function usage() { echo "Usage : $0 [options] Create a header/source/test triplet. Options: -h,--help Display this message -v,--version Display script version" } # Parse arguments declare -a args while [[ $# -gt 0 ]]; do opt="$1" case $opt in -h|--help) usage; exit 0 ;; -v|--version) echo "$0 -- Version $version"; exit 0 ;; -*) echo -e "\n Option does not exist : $opt\n" usage; exit 1 ;; *) args+=("$opt"); shift ;; esac done read -d '' fpp_copy <$f$_h printf '%s\n\n#include "%s"\n\n' "$fpp_copy" "$c$_h" >$f$_c printf '%s\n\n#include \n\n#include "%s"\n' "$fpp_copy" "$c$_h" >$f$_t done