In bash, how do I specify a pattern that matches everything but subdirectories in current directory. Given that the pattern */
matches all the subdirectories, I tried (with extglob turned on):
$ echo !(*/)
But it didn't work.
bashdirectoryfilenameswildcards
In bash, how do I specify a pattern that matches everything but subdirectories in current directory. Given that the pattern */
matches all the subdirectories, I tried (with extglob turned on):
$ echo !(*/)
But it didn't work.
Best Answer
Details:
-maxdepth 1
restricts the search to the current directory! -type d
eliminates directories