Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!fortune!rpw3 From: rpw3@fortune.UUCP Newsgroups: net.unix Subject: Re: Interesting Bourne shell usage - (nf) Message-ID: <3484@fortune.UUCP> Date: Thu, 31-May-84 04:06:10 EDT Article-I.D.: fortune.3484 Posted: Thu May 31 04:06:10 1984 Date-Received: Sat, 2-Jun-84 08:46:25 EDT Sender: notes@fortune.UUCP Organization: Fortune Systems, Redwood City, CA Lines: 24 #R:utcsrgv:-436400:fortune:26900060:000:644 fortune!rpw3 May 30 21:10:00 1984 Inspired by the "pick" command in Kernighan & Pike's book, I tried: $ for i in `find . -name '*foo*' -print` > do echo -n "${i}? " > read ans > eval $ans > done This allows you to execute a different command on each file found, or execute a command that uses the file (referenced as $i) more than once in the command (which find's -exec doesn't let you do). Just if you don't want to do anything to one of them. Hack, Hack... but useful when you need it. Rob Warnock UUCP: {ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3 DDD: (415)595-8444 USPS: Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065