[ubuntu] Bash script help

view full story

http://ubuntuforums.org – I'm trying to write a bash script that will automatically transfer the photos from the camera to a folder sorted by date. My issue is getting it to run after its mounted automatically. When i plug the camera in the script does not run, but, if i run the script through command line a few seconds after its mounted then it works. Its as if the camera is not mounted in time for the script. My Script : Code: #!/bin/bash touch "/home/josh/Desktop/file.file" ( mount /dev/sdd1 /media/Sony-A350 touch "/media/Sony-A350/DCIM/100MSDCF/" NUM=$(ls -l /media/Sony-A350/DCIM/100MSDCF/ (Hardware)