#!/bin/bash USAGE="generate-cfgmap.sh target-path" [ "$1" == "-h" ] && echo "$USAGE" && exit SOURCE="backups-manager.sh" TARGET=$1 [ ! -r "$SOURCE" ] && echo "No $SOURCE path found" && exit 1 [ -z "$TARGET" ] && echo "No target path found" && exit 1 echo " backups-manager: |"> $TARGET cat "$SOURCE" | sed 's/^/ /g' >> "$TARGET"