home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!csn!cherokee!uswmrg!engineer.mrg.uswest.com!chris
- From: chris@engineer.mrg.uswest.com (Chris Fedde)
- Subject: Re: Is there a "foreach" loop control in ksh?
- Message-ID: <1993Jan20.233510.20061@uswmrg.mrg.uswest.com.mrg.uswest.com>
- Organization: USWEST Marketing Resources
- NntpPostingHost: engineer.mrg.uswest.com
- References: <1304@alsys1.aecom.yu.edu> <1993Jan19.173407.7128@cid.aes.doe.CA> <8673@charon.cwi.nl>
- Date: 21 Jan 93 04:35:10 GMT
- Lines: 15
-
- In article <8673@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes:
- > for file in `ls | sed '/.Z$/d'` ; do compress $file ; done
-
-
- avoid the process overhead by doing
-
- for file in *.[!Z]
- do
- something_with_uncompressed_files
- done
-
- See ya
- chris
-
- Chris Fedde, USWEST MRG, chris@mrg.uswest.com, voice +13037842823
-