Re: listing directories
Steve Youngs wrote:
> ls -d */ # just ordinary directories
> ls -d .*/ # just dot-directories
> ls -d .*/ */ # both
> Add `1' (one) to the options (ls -d1) if you need a single column.
If one only wants single-column output, then do
not fork an entire process just to do it:
print -r -- .*/. */.
P.S.:
RTFM for shell option modifiers that can affect
the above behavior:
set -m & set -o markdirs
set -n & set -o noglob
BUG: Unfortunately, in ksh(1), the converse does
NOT emit only non-directory files:
print -r -- !(*/.) # doesn't work!
=Brian
|