From owner-freebsd-hackers Sat Jul 15 17:23:19 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA26283 for hackers-outgoing; Sat, 15 Jul 1995 17:23:19 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id RAA26276 for ; Sat, 15 Jul 1995 17:23:16 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA06975; Sun, 16 Jul 1995 02:21:52 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id CAA27863; Sun, 16 Jul 1995 02:21:51 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id UAA10932; Sat, 15 Jul 1995 20:06:36 +0200 From: J Wunsch Message-Id: <199507151806.UAA10932@uriah.heep.sax.de> Subject: Re: your mail To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Sat, 15 Jul 1995 20:06:35 +0200 (MET DST) Cc: aturetta@stylo.italia.com Reply-To: freebsd-hackers@freebsd.org (FreeBSD hackers) In-Reply-To: <199507142015.WAA13566@vector.eikon.e-technik.tu-muenchen.de> from "Julian Stacey" at Jul 14, 95 10:15:37 pm Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 908 Sender: hackers-owner@freebsd.org Precedence: bulk As Julian Stacey wrote: > > > > whatis `ls -1 /usr/share/man/man1/??.1* | sed -e 's/.*[/]//' -e 's/\.1.*//'` > It's a syntax err ! > sed: 1: "s/.*[/]//": RE error: brackets ([ ]) not balanced That's quite interesting. I'm aware that the correct form for the above is ls -1 /usr/share/man/man1/??.1* | sed -e 's/.*\///' -e 's/\.1.*//'` but the 1.1.5.1 system i've tested this on didn't grok this. So i've used the [/] hackaround that has been working there. According to Posix 1003.2, the latter is the correct form. People who don't like this RE slashomania can also use ls -1 /usr/share/man/man1/??.1* | sed -e 's|.*/||' -e 's/\.1.*//'` instead. Anyway, it's my opinion that several older sed's didn't like anything else than a slash as RE delimiter. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)