Chose list of sub directories in a bash script file

Hi,

I have a command in my bash script, searchDirectoryName.sh:

DIR_NAME=$(find . -type d)
echo "${DIR_NAME}"
.
./Dir1
./Dir1/1.0.2.1
./Dir2
./Dir2/1.1
./Dir3
./Dir3/2.2.1

How can I select only following directory names with second subdirectoies and without first ./ in the DIR_NAME?

Dir1/1.0.2.1
Dir2/1.1
Dir3/2.2.11

Finally substitute "/" to "_" for each name:

Dir1_1.0.2.1 
Dir2_1.1
Dir3_2.2.1

Thanks.

Kind regards.

for DIR_NAME in $(find . -type d)
do
        if [[ "$DIR_NAME" =~ \/[0-9]\. ]]
        then
                DIR_NAME="${DIR_NAME#\.\/}"
                DIR_NAME="${DIR_NAME/\//_}"
                echo "$DIR_NAME"
        fi
done

Thanks bipinajith, terrific.

Cheers.

hope this helps.

find . -type d |awk '{ gsub(/\.\//,"",$0); gsub(/\//,"_",$0);print }'