merlyn@iwarp.intel.com (Randal L. Schwartz) (02/14/91)
In article <857@caslon.cs.arizona.edu>, armstron@cs (Jim Armstrong) writes: | Is is possible to match a group of files in alphabetic order using | globbing in csh? For example my dir looks like this: | able david greedy jolly ..... | baker emery handy kape ..... | cain frank intro lemma ..... | | I want to cat all files > george (lexicographically). | | Maybe something like [g-z]* but that only looks at the first | letter and allows something like gary. | | Can anyone help me please? Hmm. Not in csh. But with a little assist from Perl: cat `ls | perl -ne 'print if $_ gt "george"'` Or, doing it all in Perl (catting and everything): perl -e '@ARGV = grep($_ gt "george",<*>); while (<>) { print; }' Just another Perl hacker, -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/