It would be much easier (read: more read- and maintainable) if you divide your code into two scripts: One to execute the actual function(s), and one to start them. Sample code for the latter:
for i in 00 01 02 03 04; do nohup /path/to/workerScript.sh ${i} done If you want to keep the logic in a single script you can still use this approach:
if [ $# -eq 0 ]; then for i in 00 01 02 03 04; do nohup $0 ${i} done exit 0 fi # Rest of the logic follows