How can i capture the output of inotifywait in this instance, it is driving me crazy.
Here is my code:
while inotifywait -q -e create,delete --format '%T %:e "%f"' --timefmt '%d/%m/%y %H:%M' "$DIR"
do
echo -e "$line" >> /mnt/pidrive1/Digital_Signage/log/"$hostname"_sync.log
echo -e "Folder contents:" $file_number "files in total: " $folder_list >> /mnt/pidrive1/Digital_Signage/log/"$hostname"_sync.log
done