Afficher un message
Vieux 18/05/2007, 05h33   #4
Harry331
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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?

  Réponse avec citation
 
Page generated in 0,04871 seconds with 9 queries