home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!timbuk.cray.com!walter.cray.com!ferris!gerardo
- From: gerardo@ferris.cray.com (Gerardo Cisneros)
- Subject: Re: WILDCARD expansion in UNIX FORTRAN
- Message-ID: <1992Aug13.101155.26123@walter.cray.com>
- Organization: Cray Research, Inc.
- References: <1992Aug13.125538.13533@nsisrv.gsfc.nasa.gov>
- Distribution: na
- Date: 13 Aug 92 10:11:54 CDT
- Lines: 20
-
- In article <1992Aug13.125538.13533@nsisrv.gsfc.nasa.gov> schieb@shark.gsfc.nasa.gov (Brian D. Schieber) writes:
- > I'm porting a VAX FORTRAN program to UNIX that uses VAX library
- >calls to expand a wildcard for filenames into an array of strings.
- >Is there any such capability for UNIX FORTRAN? Short of doing
- >a SYSTEM call and running 'find' I don't know how this would be
- >done.
-
- Where are you expecting the wildcard to come from? Wildcards in command
- lines are expanded by the shell, so the program gets an array of pointers to
- strings. If you need wildcard expansion within the program and your Fortran
- library does not have extensions supporting this, you could interface to
- the system and C-library functions getdirentries(2), opendir(3), readdir(3),
- telldir(3), seekdir(3), rewinddir(3), closedir(3) and scandir(3), where
- (2) and (3) refer to sections 2 (System calls) and 3 (Library functions) of
- the Unix manual.
- --
- Dr. Gerardo Cisneros |Cray Research de M'exico, S.A. de C.V.
- gerardo.cisneros@cray.com |Camino a Sta. Teresa 480-A #302
- (+52+5)622-8584 |14020 Tlalpan, D.F., MEXICO
- Anything I said sound like an opinion? Then it's no one's but my own.
-