For loop in bash using ls to get array of file names
So I have a group of files of the form:
cluster_1 cluster_2 cluster_3 etc
CLUSTERS="ls cluster_*"
for zzCLUSTER in $CLUSTERS
do
cat "${zzCLUSTERS}" | tr '/' ' ' | uniq | cat > "${zzCLUSTERS}".reads
done
but for some reason this isent working? I've looked at like 50 examples and I can't seem to get it to work. It says that I can't redirect
|