Hi everyone - just like to say great forum...I've learned a lot off here but I just can't figure this one out...(first post)
I'm writing a script to monitor a directory and email the latest modified file....(I realize there are better ways than I'm trying here...I don't like copying and pasting bits of code...I like to understand what I actually type)
I've figured out how to email the file as an attachment with mutt....so I didn't include that part here...
Can't figure out why the loop won't exit once 'find' gets the file....just keeps repeating the file name...thanks in advance:
temp=""
while [ "$temp = null" ]
do
sleep 1
temp=`find /home/user/My\ Documents/motion_capture/ -amin -2`
echo $temp
done
Hey Scottn - I was playing with the -z option for test...just couldn't get it to work properly...thanks that works perfect! . ...
I'll keep working on my final project now that you got me past that...
what I am working on is a little motion detection system...I have the program 'motion' taking snapshots and saving them on the disk, I need the first one that is created to be emailed to me, since I am just using my webcam (built-in to laptop) - someone could just steal my laptop - so I need the first one to be emailed to myself....I know it sounds simple...but I'm working in a Camp in Northern Alberta Canada, and the cleaning staff here have been stealing etc....thanks again Scottn