#!/usr/bin/env bash if [ $# -eq 0 ]; then echo "Usage: $0 [file2] ..." >&2 exit 1 fi for file in "$@"; do if [ ! -f "$file" ]; then echo "Error: File not found: $file" >&2 exit 1 fi printf '\n\n\n ## FROM %s\n\n' "$file" cat "$file" done