• # Precision

    Posté par . En réponse au message Passage de variable depuis une boucle. Évalué à 1.

    cat < $FILE_EXT | while true
    		do
    			read temp_line2
    			if [ "$temp_line2" = "" ]; then break; fi
    			tablespace2=$temp_line2
    			echo tablespace fr= "$tablespace"
    			echo tablespace2= "$tablespace2"
    			if [ "$tablespace" = "$tablespace2" ]
    			then
    				already_exists="1"
    				echo already_exists 28= $already_exists 
    				break
    			else
    				already_exists="0"
    				echo already_exists 32= $already_exists
    			fi
    			echo already_exists 34= $already_exists
    		done
    		echo already_exists 36= $already_exists
    	fi
    	echo already_exists 39= $already_exists
    
    Renvoie : tablespace fr= ALERT_IDX tablespace2= ALERT already_exists 32= 0 already_exists 34= 0 already_exists 36= already_exists 39= already_exists 61= 0 tablespace fr= ALERT_IDX tablespace2= ALERT already_exists 32= 0 already_exists 34= 0 tablespace fr= ALERT_IDX tablespace2= ALERT_IDX already_exists 28= 1 already_exists 36= 0 already_exists 39= 0 already_exists 61= 0 tablespace fr= ALERT_IDX tablespace2= ALERT already_exists 32= 0 already_exists 34= 0 tablespace fr= ALERT_IDX tablespace2= ALERT_IDX already_exists 28= 1 already_exists 36= 0 already_exists 39= 0 already_exists 61= 0 Donc c'est bien already_exists qui ne passe pas correctement la sortie de la boucle... Je comprends pas mais alors pas du tout...