Basic HTML version of Foils prepared March 30 97

Foil 73 Globbing (Chapter 12 of Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


1 We use * notation in shell to match sets of files -- this is NOT same as regular expression as * is equivalent to (.*) except normally files beginning with . are not accessed with a simple glob
  • Presumably glob is "short" for globalize not globular
2 @a= <file name with globbing>; returns a list (one per element of @a) of files matching globbed specification
  • For example @a= < *cps616*> returns all files in current directory with string cps616 somewhere in their name.
3 Variable Interpolation is allowed in globbing e.g.
4 $home="~gcf"; # gcf's home directory is ~gcf
5 @a = <$home/*>; # returns all non initial . files in gcf's home directory

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997