Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utcsrgv.UUCP Path: utzoo!utcsrgv!dave From: dave@utcsrgv.UUCP (Dave Sherman) Newsgroups: net.unix Subject: Interesting Bourne shell usage Message-ID: <4364@utcsrgv.UUCP> Date: Mon, 21-May-84 23:17:26 EDT Article-I.D.: utcsrgv.4364 Posted: Mon May 21 23:17:26 1984 Date-Received: Tue, 22-May-84 04:35:12 EDT Organization: The Law Society of Upper Canada, Toronto Lines: 24 Recently I have gotten to like using the Bourne shell for programming on the fly - not even creating a shell file, as I did in days of old. Today I was revising a software package in a "test" subdirectory, and wanted a quick list of all the diffs. Then I thought I might like to save a copy. I tried the following, and to my surprise, it worked: $ for i in *.c > do > echo $i: > echo > diff $i ../$i > echo > done ^ tee junk It was the pipe at the end that worked "to my surprise". I guess it makes sense, since the "for" is all one command, but it was kind of unusual. Dave Sherman Toronto -- dave at Toronto (CSnet) {allegra,cornell,decvax,ihnp4,linus,utzoo}!utcsrgv!dave