On Mon, Apr 26, 2004 at 08:41:57AM -0700, Ryan Bowman wrote:
> I need a regular expression that will only match filenames with NO
> periods in them.  My attempts so far don't seem to work at all, in the
> least.  Can someone give me a hint, please?

You can do an inverse grep using -v option:

ls -1 | grep -v "\."

Or you can specify exactly what you are looking for like this:

ls -1 | grep "^[a-zA-Z0-9]*$"

which I think is the same as this:

ls -1 | grep "^\w*$"

but what you really want to know is this:

ls -1 | grep "^[^\.]*$"

Have fun,
Phillip

-- 
Phillip Hellewell <[EMAIL PROTECTED]>

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to