18/05/2007, 05h33
|
#4
|
|
|
Re: how to detect the dir to cd to begins with a dot
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?
>
>e.g.
>
>find . -type d |
> while read dir
> do
> if [ $dir begins with a dot ]
> then
> continue
> else
> do stuff
> fi
> done
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?
|
|
|
|