NEO, this is excellent.
I work on a Mac to administer a linux server on the web. I was having problems using the find-replace technique to create a clone of 2.8.6. It worked one time, and was able to get one clone made that way, but subsequent attemtps to create additional clones kept failing.
I decided to try your bash script. Here were the steps I took:
1) Using webmin, uploaded the latest SOBI2 component zip file and extracted it on the server.
2) Uploaded your bash script to the same directory as the extracted SOBI2 Component.
3) Opened up my SSH client on my mac, and connected to the server.
4) Changed directories to my directory where the bash script and extracted SOBI2 files were.
5) Executed the bash script with the 'sh clone_sobi.sh' command.
6) Followed the prompts in the script to name my new clone.
7) The script completed successfully, verified by observing the renamed files in the directory.
8 ) In Joomla 1.5, went to the component install screen and used the INSTALL DIRECTORY option (the directory where the extracted and now modified SOBI2 files were).
9) Clicked the install button and SUCCESS! Component installed successfully.
Upon looking at the component menu, my new clone appears in the list, and everything in the clone appears to be working properly thus far. I'll let you know if I run in to any bugs.
Thanks again for your script!