Isn't 'ls' usually a shell built-in command? If so, you would
probably find the closest "equivalent" in the docs for the
shell (bash, tcsh, ksh,...).

You could probably write your own such utility on perl (or
python I imagine):

pls:
=======================
#!/usr/bin/perl -w
my $regex = join(" ", @ARGV);
opendir(DIR, ".");
@files = readdir(DIR);
closedir(DIR);
foreach $file (@files)
{
   if ($file =~ m/$regex/)
   {
      print "$file\n";
   }
}
======================

It could be done shorter, but it is clearer I think.
But there is the "escaping everything the shell
wants to grab" problem... :-/

Troy

>>> list at slushpupie.com 07/12/01 09:52AM >>>
Does anyone know of a ls equivalent that supports regular expression
matching?

ie- do things like this:

ls /^[A-Z]/

I know this can be done by piping to other commands (grep, awk, sort, etc)
but is there a command that just does it?

Jay



--
Jay
Publishing Business Systems
651-634-9217

_______________________________________________
tclug-list mailing list
tclug-list at mn-linux.org 
https://mailman.mn-linux.org/mailman/listinfo/tclug-list