i tried all your commands.. it works well for counter and anything after trunk if that is a directory.. But i have many of these url's with filenames..
What i had tried to accomplish from my initial commands is to basically take out the filenames ($file) and http://svn.company.com/svn/abcd/trunk from $i. So that i can get as below:
1) counter/
2) this should give me a blank because there is nothing found after removing http://svn.company.com/svn/abcd/trunk/ and xyz.xml
3) mno/scripts/diary/
So that i can create directories of whatever is left out. In case of 2, i will create it on the parent directory where the command is running.. So i thought if i can just take out the $file and http://svn.company.com/svn/abcd/trunk , it should give me the dirs..