In message <[EMAIL PROTECTED]> on Wed, 05 Jun 2002 10:10:52 -0400, Rich Salz <[EMAIL PROTECTED]> said:
rsalz> > rsalz> */* ) echo "$I" | sed -e 's@\(.*\)/.*@\1@' ;; rsalz> > rsalz> > Why such a complicated sed? 's@/[^/]*$@@' is perfecty sufficient, and rsalz> > a little bit more efficient :-). rsalz> rsalz> Because it makes the implementation of "basename" pretty rsalz> obvious :) sed -e 's|^[^/]*/||g' rsalz> As for efficiency :) here's an implementation that uses all rsalz> shell builtins ... Heh, we can probably battle endlessly about efficiency. That was a pretty good one, and a bit less obscure than the expr variant shown here. :-) -- Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED] Redakteur@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47 \ SWEDEN \ or +46-708-26 53 44 Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED] Member of the OpenSSL development team: http://www.openssl.org/ Unsolicited commercial email is subject to an archival fee of $400. See <http://www.stacken.kth.se/~levitte/mail/> for more info. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]