[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Need help with RE in egrep



I've been using regular expressions for years, but sometimes I just 
can't find the right answer.  I'm trying to generate a list of files in 
a directory, excluding the top level hidden directories and files.

I've tried the following and nothing seems to work.  Can someone please 
direct me to the right answer?

   find . | egrep -v '^\.*' | more
   find . | egrep -v '^\./\.*' | more
   find . | egrep -v '^\.\/\.*' | more
   find . | egrep -v '^\.\/\.*$' | more

The output of file . is like

./file
./.hidden

I didn't think I need to escape the slash but out of desperation I tried it.

Thanks,
Jim.