Globbing in csh

D'Arcy J.M. Cain darcy at druid.uucp
Sat Feb 16 00:58:12 AEST 1991


In article <857 at caslon.cs.arizona.edu> Jim Armstrong writes:
>Is is possible to match a group of files in alphabetic order using

Here is a general solution rather than a csh one:

ls | awk '{ if ($1 == "george") {start = 1} else if (start) print ;}'

Or even simpler:

ls | sed '1,/george/d'

So your example would be:

cat `ls | sed '1,/george/d'` > out_file

-- 
D'Arcy J.M. Cain (darcy at druid)     |
D'Arcy Cain Consulting             |   There's no government
West Hill, Ontario, Canada         |   like no government!
+1 416 281 6094                    |



More information about the Comp.unix.questions mailing list