wcs@ho95b.UUCP (59577) (05/24/84)
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
sdo@u1100a.UUCP (Scott Orshan) (05/25/84)
I always use ^ for a pipe when I'm typing on my keyboard because it's unshifted, while | is shifted. When I'm using a keyboard where they're both shifted, I'll use | since it is in an easier place to type shifted using one hand. However, no matter what keyboard I'm using, if I'm putting a pipe into a shell script in a file, even if it is only temporary, I use | so I know it will always work in the future. Scott Orshan {ihnp4,allegra,pyuxww}!u1100a!sdo
dave@utcsrgv.UUCP (Dave Sherman) (05/31/84)
Bill Stewart comments on my use of ^ instead of | for the pipe. That, of course, goes back to v6 (and beyond); I've always used it. I got started on UNIX using terminals on which ^ was lower-case and | was upper-case, so ^ was used automatically. Nowadays I use VT-100's and compatibles, which tend to have ^ as shift-6 and | as shift-\, but I can't/won't break the ^ habit. Yes, grep "^abc" file is a case in which it would be useful to have ^ as a non-special character, but I can live with it. Dave Sherman Toronto -- dave at Toronto (CSnet) {allegra,cornell,decvax,ihnp4,linus,utzoo}!utcsrgv!dave