I'm trying to write a bash script that loops over directories that start with one of two strings in a given folder. I wrote the following:
for aSubj in /wherever/*
if [[ -d $aSubj ] && [[ $aSubj == hu* ] || [ $aSubj == ny* ]]]; then
.
.
fi
done
When I try and run this I get a syntax error on the line of the 'if': syntax error near unexpected token 'if'
Can anyone point out where I'm going wrong?
Aucun commentaire:
Enregistrer un commentaire