mkdir -p /home/pi/Extract/Diagnostic/Images/Raw mkdir -p /home/pi/Extract/Diagnostic/Images/Rectified for ch in {0..10}; do echo "Capturing channel $ch..." curl "http://10.99.164.4/pi-cgi/captureRawLive.cgi?$ch=/home/pi/Extract/Diagnostic/Images/Raw/$ch.jpg" curl "http://10.99.164.4/pi-cgi/captureRectified.cgi?$ch=/home/pi/Extract/Diagnostic/Images/Rectified/$ch.jpg" done