update display host name

This commit is contained in:
2025-05-29 07:30:21 +02:00
parent b2c2a83f30
commit 8a1a871bfc

View File

@@ -207,13 +207,11 @@ current=0
for machine in "${machines[@]}"; do for machine in "${machines[@]}"; do
((current++))
percent=$(( current * 100 / total ))
echo -ne "[${percent}%] $machine ($current/$total)\n"
# Vérification si le nom de machine est présent dans le fichier .config/updateall-hosts # Vérification si le nom de machine est présent dans le fichier .config/updateall-hosts
echo -e "\n" echo -e "\n"
echo -n " >> $machine " ((current++))
echo -ne ">> $machine ($current/$total)\n"
if grep -q "^$machine " ~/.config/updateall-hosts; then if grep -q "^$machine " ~/.config/updateall-hosts; then
status=$(grep "^$machine " ~/.config/updateall-hosts | awk '{print $2}') status=$(grep "^$machine " ~/.config/updateall-hosts | awk '{print $2}')