I have say 100 text files of which 50 of them have file name starting with sshv2l and other fifty without sshv2l. I want to merge them in a loop like this (below) where I have two sets of merged files. For the ones with sshv2l, I did something like below, but could not merge files without sshv2l. How do I write if not condition within for loop in bash?
for f in sshv2l*; do
echo "Merging file :" $f
cat ${f} >> sshv2l_merged.fastq
done