ls | grep [0-9A-Za-z][^re]c$
Won't pick up files called c, but should suit your purposes. Aside from that
you could have a go at using find, it can be made search for some very
unusual things . . .
steve
-----Original Message-----
From: Ian_Hanney at canadalife.ie [mailto:Ian_Hanney at canadalife.ie]
Sent: 16 July 2001 09:53
To: ilug at linux.ie
Subject: [ILUG] listing files
Hi,
I have a list of files in a directory ending in 'c' such as
foo1.rec
foo1c
f002.rec
f002c
..
..
How can I list the files that end in 'c' excluding the '.rec' guys? I've
been fiddling with ls for too long now!
Thanks,
Ian.
--
Irish Linux Users' Group: ilug at linux.iehttp://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster at linux.ie
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!