Jim Gifford wrote: > if [ -e /dev/cdrom$link ]; then > link=$[$link+1] > else > test=1 > echo $link Does not really work, because everything can be run in parallel, what you need is some semaphore like "test and create device" operation, which has to be atomic :)