I stumbled over here looking for some help with Bash shell scripts..
See, the problem was I needed to copy a data DVD into (onto?) the system file space. Since this is a virtual machine, copying a DVD takes a very long time, the drive gets hot, starts dispensing error codes instead of data bits, and I abort the copy process somewhere in the middle.
Looking at the destination directory I can see where the copy process stopped, but I couldn't figure out how to restart it at that point.
I've always had trouble with abstract symbols and need a concrete example to work on, so I'll post what worked for me. Perhaps it will be the hint you are looking for.
for x in m n o p q r s t do cp -Rv "/Src_dir/"$x destination_dir done
for x in etc home data usr/local usr/share do cp -Rv /$x /system/backup done
would copy those directories, and everything 'underneath to the system backup directory
Ok, so I don't really know why the drive spits out errors, but the copy command often fails to copy the entire dvd. Being able to restart, or copy only a portion of the dvd file structure was what I needed to do.
PIMF as is Google