well find is probably the primary tool, but i find its options
confusing. I whould probably therefore do:

ls |egrep -v \.dat$

-v reverses the results, like prints all those that don't match.

$ matches the end of the line, so \.dat$ matches all files with .dat at
the end of the name.

On Sun, 08 Feb 2004
11:51:42+1300 anton<[EMAIL PROTECTED]> wrote:

> Hi,
> I want to get a list of the files in a directory that do NOT end with 
> ".dat". I just can't work out how to do it - any suggestions?
> Cheers
> Anton
> ps, i started with the idea of $ ls | grep \^d^a^t but it fails 
> miserably :-(
> -=-=-
> ... Cerebus:  I'd love to lick apricot brandy out of your navel.
> Jaka:         Look, Cerebus-- Jaka has to tell you ... something
> Cerebus:      If Cerebus had a navel, would you lick apricot brandy out of it?
> Jaka:         Ugh!
> Cerebus:      You don't like apricot brandy?
>               -- Cerebus #6, "The Secret"
> 
> 


Reply via email to