get info in a loop from a sysfs entry