Chris Green chris@areti.co.uk writes:
The 'for i in *' means that the files are processed in the order shown above with the 'server' files before the 'halkidiki' ones. I want to *guarantee* that the 'halkidiki' ones come first, can anyone come up with a way of doing this?
for i in *halkidiki* *server*
Doesn't work because not all the directories have both server and halkidiki files.
for i in *halkidiki* *server*; do if [ -e "$i" ]; then # clever things fi done