How can I join all of the files in a directory. I can do it in one step by explicitly naming the files below, is there a way to do it without explicitly naming the files?>
#!/bin/bash
data=
for f in "${rpkmDir}"/HS*.chsn.rpkm
do
if [ ! "$data" ]
then
data="$(sort "$f")"
continue
fi
data="$(join <(sort "$f") /dev/stdin <<< "$data")"
done
echo "$data"