function Farmis_erste_Farm_annehmen { case $MFFUSER in * ) #Farmis 1. Farm NUMFARMIES=$($JQBIN '.updateblock.farmis[0] | length' $FARMDATAFILE) if [ $NUMFARMIES -gt 0 ] 2>/dev/null; then NUMFARMIES=$((NUMFARMIES-1)) for FARMIE in $(seq 0 $NUMFARMIES); do ID=$($JQBIN '.updateblock.farmis[0]['${FARMIE}'].id | tonumber' $FARMDATAFILE) echo "Nehme Farmi Nummer $((FARMIE+1)) (ID ${ID}) an." SendAJAXFarmRequest "mode=sellfarmi&farm=1&position=1&id=${ID}&farmi=${ID}&status=1" done fi ;; esac }