« Bash : Script Ping » : différence entre les versions

De www.yakakliker.org
(Page créée avec « <syntaxhighlight lang="bash"> #!/bin/bash IP="8.8.8.8" # Replace with the IP address you want to ping COUNT=1 # Number of ping attempts if ping -c $COUNT $IP > /dev/null 2>&1; then echo "Ping to $IP was successful." else echo "Ping to $IP failed." fi </syntaxhighlight> === Liens === https://tecadmin.net/check-network-connectivity-using-ping-in-shell-scripts/ Catégorie:Scripts Catégorie:Bash Catégorie:Linux »)
 
Aucun résumé des modifications
 
(2 versions intermédiaires par le même utilisateur non affichées)
Ligne 18 : Ligne 18 :
[[Catégorie:Bash]]
[[Catégorie:Bash]]
[[Catégorie:Linux]]
[[Catégorie:Linux]]
‎<html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
‎</html>
‎<html>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
‎</html>

Dernière version du 17 février 2025 à 17:45

#!/bin/bash
 
IP="8.8.8.8" # Replace with the IP address you want to ping
COUNT=1 # Number of ping attempts
 
if ping -c $COUNT $IP > /dev/null 2>&1; then
  echo "Ping to $IP was successful."
else
  echo "Ping to $IP failed."
fi

Liens

https://tecadmin.net/check-network-connectivity-using-ping-in-shell-scripts/

compteur web gratuit sans pub