#!/bin/bash for i in "$@"; do gphoto2 -u "$i" --folder /store_00010001/ --filename=img.jpg || sleep 10 done