I have used the find
command to get the following list of sub-folders:
$ find -mindepth 1 -maxdepth 2 -type d
./aa/one
./bb/two
./cc/three
How can I remove ./**/
?
Expected result:
one
two
three
$ echo "./aa/one
./bb/two
./cc/three" | sed 's@^.*/@@'
one
two
three
or better use this instead:
find -mindepth 1 -maxdepth 2 -type d -printf "%f\n"