From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fw.softwell.se ([193.15.236.45]) by hawkwind.utcs.toronto.edu with SMTP id <26338>; Fri, 19 May 2000 18:01:30 -0400 Received: from trillian.softwell.se (IDENT:bengt@trillian.softwell.se [192.42.172.11]) by fw.softwell.se (8.9.3/8.9.3) with ESMTP id OAA25413; Thu, 18 May 2000 14:57:31 +0200 Received: (from bengt@localhost) by trillian.softwell.se (8.8.7/8.8.7) id OAA06188; Thu, 18 May 2000 14:57:30 +0200 Date: Thu, 18 May 2000 08:57:30 -0400 From: Bengt Kleberg Message-Id: <200005181257.OAA06188@trillian.softwell.se> To: bengt@softwell.se, tjg@star.le.ac.uk Subject: Re: ifs substitution, how should it work? Cc: rc@hawkwind.utcs.toronto.edu > From: Tim Goodwin > > ; x = ``(abc) {cmd...} > > ; echo $x => 1a2b3 4c5 > If you want awk, you know where to find it. :-) Yes, but I had this little problem and suddenly realised that the mysterious ``(abc) {cmd...} actually might be used for something! I have never used it before. > I don't think anything more complicated than single character field > seperators belongs in a shell: particularly not rc. OK. Would you consider making ``(abc) a parse time error? only allow ifs=asd, or ifs=( a s d ), not ifs=(asd) too. Or, as with the confusing if ( {} && {} ) {cmd...} vs if ( () && () ) {cmd...} document it. > What's the actual problem you're trying to solve? split a filename into directory, filename and suffix. the suffix should be allowed to have more than 1 character. the idea is to make the previously emailed base_name function (made by Carlo Strozzi ) more like the os utility basename. Best Wishes, Bengt =============================================================== Everything aforementioned should be regarded as totally private opinions, and nothing else. bengt@softwell.se ``His great strength is that he is uncompromising. It would make him physically ill to think of programming in C++.''