Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ProcessImages()
- {
- if [ -d ${BASEDIR}/src ]
- then
- IdleWas=0
- (sleep 1 ; DisplayStatus)&
- cd ${BASEDIR}/src
- for Img in *jpg *JPG
- do
- CPU=($(grep -w ^cpu /proc/stat))
- IdleNow=${CPU[4]}
- IdleTime=$(( ${IdleNow} - ${IdleWas} ))
- IdleWas=${IdleNow}
- while [ ${IdleTime} -lt 1 ]
- do
- sleep 0
- CPU=($(grep -w ^cpu /proc/stat))
- IdleNow=${CPU[4]}
- IdleTime=$(( ${IdleNow} - ${IdleWas} ))
- done
- ProcessOneImage $Img&
- done
- wait
- else
- echo "No source directory ${BASEDIR}/src"
- fi
- }
- function ProcessOneImage() { blabla}
Advertisement
Add Comment
Please, Sign In to add comment