3 Nov
2005
3 Nov
'05
11:51 a.m.
On Thu, Nov 03, 2005 at 10:59:56AM +0000, Richard Kettlewell wrote:
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
Ah, yes, how simple, thanks! -- Chris Green (chris@areti.co.uk) "Never ascribe to malice that which can be explained by incompetence."