I'm writing a little script to use the webcam on the laptop and then email across the photo to me. The ffmpeg usage has to have a exit code for it to work so with this exit the mail function will not get called. What am I doing wrong?
#!/bin/bash
[email protected]
ts=`date +%s`
list=$(ls | tail -n 1)
function mcheese(){
mkdir /tmp/cheese
cd /tmp/cheese
echo -e "Cheese " | mutt -s "$TS Cheese" $MAIL_ADDR -a $list
}
function cheese(){
ffmpeg -f video4linux2 -s vga -i /dev/video0 -vframes 3 /tmp/cheese/vid-$ts.%01d.jpg
exit 0
}
cheese
mcheese
exit 0
? Note that you canreturn 0
from a function without exiting the whole script.$(ffmpeg ... ; exit 0)
.yasm-1.1.0.tar.gz
file appear?