* Harry331 <harryooopotter@hotmail.co_>:
> paintedjazz@gmail.com wrote...
>>
>>Is there a way in a bash script to detect if the directory one is
>>about to cd into is a directory that begins with a dot?
>> [ ... ]
>
> everything from
> find . -type d
> starts with a dot.
>
> e.g.
>
> $ cd /cygdrive/c/cygwin
> $ find . -type d
> .
> ./etc
> ./etc/setup
> ./etc/postinstall
> ./etc/defaults
> ./etc/defaults/etc
> [snip]
>
> Isn't it?
You are quite right! Something I overlooked too. I suppose the
simplest solution using find is to have find itself test for and exclude
directories beginning with a dot.
$ ls -A
..quux bar baz foo
$ find . -type d ! -name '.*' -print
../foo
../bar
../baz
--
James Michael Fultz <xyzzy@sent.as.invalid>
Remove this part when replying ^^^^^^^^