How to find directories without dot in bash? -
i try find folders without dot symbol. search in users directory via script:
!#/bin/bash users=$(ls /home) user in $users; find /home/$user/web/ -maxdepth 1 -type d -iname '*' ! -iname "*.*" done but see in result users folders dot, example - test.uk or test.cf
what wrong?
thanks in advance!
you can use find -regex option that:
find /home/$user/web/ -maxdepth 1 -type d -regex '\./[^.]*$' '\./[^.]*$' match names without dot.
Comments
Post a Comment