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

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 23 : Ligne 23 :
   kofiWidgetOverlay.draw('yakakliker', {
   kofiWidgetOverlay.draw('yakakliker', {
     'type': 'floating-chat',
     'type': 'floating-chat',
     'floating-chat.donateButton.text': 'Donate',
     'floating-chat.donateButton.text': 'Café',
     'floating-chat.donateButton.background-color': '#00b9fe',
     'floating-chat.donateButton.background-color': '#00b9fe',
     'floating-chat.donateButton.text-color': '#fff'
     'floating-chat.donateButton.text-color': '#fff'

Version du 21 janvier 2025 à 13:48

#!/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/