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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -