Shell script for a writing the directory structure to a file

Hi All,
I am new user of shell scripting has come up with a problem. that I have a directory structure like :

Home
|
|--------A
| |----trunk
| |-------A_0_1/
| |
| |-------A_0_2/
|
|--------B
| |-----trunk
| |-------B_0_1/
| |
| |-------B_0_2/
|
|--------C
| |-----trunk
| |---------C_0_1/

My problem is to write a script that will generate a file reporting this file hierarchy i.e (The script can be run be from Home)
(Directiry structure states that under Home/ there are 3 subdirectories called A, B, C . Each has another subdirectory called trunk/, all trunk contains the versions of original directory like A_0_1, A_0_2, B_0_1...so on)

$ cat file
--------------
A/trunk/A_0_1
A/trunk/A_0_2
B/trunk/B_0_1
B/trunk/B_0_2
C/trunk/C_0_1
--------------

Please help me regarding this. Thanks in advance.

If you are working on Linux, Use the following command to list out all the sub directories in a Directory
ls -R|grep :expressionless: awk -F':' '{ print $1}'

Thanks for the help..but in my sub directories there are many number of other subdirectories...so the falling command lists out all the directories/subdirectories inside it...I want to restrict it in 3 levels only...i.e Ditrectory/trunk/Directory_version_subversion ....it should not go to the next depth..any specific solution for it?? thanks in advance

ls -R| grep /| awk -F'/' '{ printf("%s/%s/%s\n",$2,$3,$4)}'

thanks it is working now

There is no need to use the Recursive option if you only need 3 levels.

Suppose this is the structure (which has more than 3 levels):

$ find . -print
.
./A
./A/trunk
./A/trunk/A_0_1
./A/trunk/A_0_1/tmp
./A/trunk/A_0_2
./A/trunk/A_0_2/testfile.txt
./B
./B/trunk
./B/trunk/B_0_1
./B/trunk/B_0_1/junk
./B/trunk/B_0_2
./C
./C/trunk
./C/trunk/C_0_1

Only show three levels:

$ ls -1d */*/*
A/trunk/A_0_1
A/trunk/A_0_2
B/trunk/B_0_1
B/trunk/B_0_2
C/trunk/C_0_1

Excellent now the work is more easy thanks..it seems shell script is a really vast thing full of tricks and tweaks :)..thanks once again