for binfile in $isopath/memtest86*.bin; do
  if [ -e "$binfile" ]; then
    regexp --set=binname "$isopath/(.*)" "$binfile"
    menuentry "$binname" "$binfile" {
      bin_file="$2"
      linux16 $bin_file
    }
  fi
done
