for f in *; do
printf '%s\n' "$f"
paste /dev/null - < "$f"
done
Would print the file name followed by its content with each line preceded by a TAB character for each file in the directory.
Same with GNU awk
:
awk 'BEGINFILE{print FILENAME};{print "\t" $0}' ./*
Or to avoid printing the name of empty files:
awk 'FNR==1 {print FILENAME}; {print "\t" $0}' ./*
Or with GNU sed
:
sed -s '1F;s/^/\t/' ./*