Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!lll-tis!lll-winken!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.questions Subject: Re: what's the use of "{ list }" in /bin/sh? Message-ID: <559@philmds.UUCP> Date: 9 Jul 88 11:35:40 GMT References: <23590@teknowledge-vaxc.ARPA> <409@fmeed1.UUCP> <11755@agate.BERKELEY.EDU> <22305@tis.llnl.gov>Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 20 In article ron@topaz.rutgers.edu (Ron Natalie) writes: >> Besides obvious uses mentioned in previous articles thus far, >> recent Bourne shells allow a rudimentary aliasing using "{" and "}". > >Rudimentary? Shell functions are much more powerful and straight >forward that the Csh alias kluding. Another shell war flaming up? Or hasn't the old one finished yet? En garde! B.T.W. even the standard Bourne shell allows for some kind of 'functions', be it without arguments (but you can use shell variables); ever heard of eval? It is more powerful than the alias mechanism (at least I think it is; don't use csh myself). The only drawback is that you have to put 'eval' in front of the stuff to be evaluated; but then, this isn't so bad, since you see at last what you're doing. I dislike an alias like: alias rm 'rm -i' for the same reason I dislike using scripts or programs with the same name as existing ones - unless of course you have to. Leo (slogan='echo $USER: Bourne to be wild 8-\)'; eval $slogan)