#!/usr/bin/env bash

# load the list of filenames into an array
files=(files/*)

if [[ -t 1 ]]; then
	# stdout is a tty! print normal
	printf '%s ' "${files[@]}"
	printf '\n'
else
	# not a tty - separate new-lines
	printf '%s\n' "${files[@]}"
fi
