Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
The first reason being it'll delete everything the script created. The second being it'll delete anything that was in the present directory beforehand (possibly including the script...)
I'm by no means a knowledgeable shell scripter, but maybe try testing for the existence of a file / directory called 'working', or something similar. If the file / directory exists, abort the script. If it doesn't, create it, do everything you need to do inside, then delete the directory.
The first reason being it'll delete everything the script created. The second being it'll delete anything that was in the present directory beforehand (possibly including the script...)
I'm by no means a knowledgeable shell scripter, but maybe try testing for the existence of a file / directory called 'working', or something similar. If the file / directory exists, abort the script. If it doesn't, create it, do everything you need to do inside, then delete the directory.
somehow forgot the rest of the thing, updated in the code posted above, although do agree the best would be to make a sub-directory, go into and then do the needful. Updated the script to share that as well.
I just know there is so much I don't know about shell scripting as well but we all have to start somewhere.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26