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.