Skip to content

Instantly share code, notes, and snippets.

@nickistre
Created September 9, 2021 18:29
Show Gist options
  • Save nickistre/f623d2c77e29dbb70b4429342eb21649 to your computer and use it in GitHub Desktop.
Save nickistre/f623d2c77e29dbb70b4429342eb21649 to your computer and use it in GitHub Desktop.
Script to watch for when a disk drops out
#!/bin/bash
# Infinite loop
for (( ; ; ))
do
for arg in "${@}"
do
if [ ! -e "${arg}" ]
then
echo "'${arg}' is gone"
date
exit 0
fi
sleep 1
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment