Files
WEBSITE_hugulumu/build.sh
2023-10-25 14:32:56 +02:00

21 lines
582 B
Bash

#!/bin/bash
# Define the file to watch
file_to_watch="./"
## Watch for modification events on the file continuously
#inotifywait --monitor --event modify "$file_to_watch" | tee /dev/tty
#while read -r directory events filename; do
# echo "The file $filename was modified."
# # Add your desired actions here
#done
#inotifywait --monitor --event modify --format '%w %e %f' "$file_to_watch"
while read -r directory events filename; do
echo "The file $filename was modified."
# Add your desired actions here
done < <(inotifywait --monitor --event modify "$file_to_watch")