Shay Dahan
Shay Dahan

Reputation: 11

how to list all files in a directory which contain only one dot

I am trying to get all files in a directory which contain only one extension dot such as abcd.py and not abcd.efg.py

i've tried ls ~/scripts/[^.].py with no success

Upvotes: 0

Views: 394

Answers (1)

Shay Dahan
Shay Dahan

Reputation: 11

eventually, I used: find ~/scripts/ -regex "[^.]*.py"

Upvotes: 1

Related Questions