> -for (my $i = 0, $found=0; $i <= 4 && !$found; $i++) > +for (my $i = 0, $found=0; $i <= 31 && !$found; $i++) To get rid of the problem entirely, can't we do something like this with shell globs? Pseudo code: foreach (/sys/bus/i2c/devices/*-0057/eeprom) $found += <found device> if (!$found) foreach (/proc/sys/dev/sensors/eeprom-i2c-*-57) check_old_interface $found += <found device>
Attachment:
signature.asc
Description: PGP signature