Xref: utzoo comp.unix.questions:28680 comp.lang.perl:4036 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.unix.questions,comp.lang.perl Subject: Re: Globbing in csh Message-ID: <1991Feb14.063713.14420@iwarp.intel.com> Date: 14 Feb 91 06:37:13 GMT References: <857@caslon.cs.arizona.edu> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Followup-To: comp.unix.questions Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 28 In-Reply-To: armstron@cs.arizona.edu (Jim Armstrong) 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'..."====/