[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Request for advice: typespeed postinst



frank@kuesterei.ch (Frank Küster) wrote, that's me:

> ,----
> | OLDFILES=0
> | for i in *.old-$$; do
> |   if [ -e $i ]; then OLDFILES=1; fi
> | done
> `----
[...]
> 2. The test -e will always yield true if the star in *.old-\$\$ expanded
>    to something, i.e. if the loop is run at all. It is simply not
>    necessary. 

This is not true, it will loop once over the string '*.old-$$'. Still,
the code I suggest seems more readable for me.

Regards, Frank
-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie



Reply to: