Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ho95b.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!ho95b!wcs From: wcs@ho95b.UUCP (59577) Newsgroups: net.unix Subject: Re: Interesting Bourne shell usage, and ^ for pipe Message-ID: <142@ho95b.UUCP> Date: Thu, 24-May-84 13:40:01 EDT Article-I.D.: ho95b.142 Posted: Thu May 24 13:40:01 1984 Date-Received: Wed, 30-May-84 08:49:09 EDT References: <4364@utcsrgv.UUCP> Organization: AT&T Bell Labs, Holmdel NJ Lines: 26 Dave Sherman posted a quick shell program, containing: $ for i in *.c > do ...... > done ^ tee junk What interested me about this was the use of the ^caret as a pipe symbol, instead of the | vertical bar. This is kind of an archaism; the Korn Shell (ksh) has dropped it, although the System V shell still supports it. Do many people out there use ^ ? I much prefer the ability to say grep ^joeuser /etc/passwd without being told sh: joeuser: not found Another note on this is that /bin/sh forks off a process to do the for loop when directing its output to a pipe; ksh doesn't. This feature, and builtins for echo and expr considerably speed up shell script execution in ksh. Bill -- The virtual keyboard of: Bill Stewart AT&T Bell Labs, Holmdel NJ ...!ihnp4!ho95b!wcs