[ale] Need help with RE in egrep
Mike Harrison
cluon at geeklabs.com
Sat Sep 18 15:03:46 EDT 2010
Would using:
find -type f
work for you?
On Sat, 18 Sep 2010, Jim Lynch wrote:
> 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.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
--
Mike Harrison bogon at geeklabs.com - heavily filtered public address
423-605-6943 http://geeklabs.com
More information about the Ale
mailing list