Pandu Poluan <pa...@poluan.info> wrote:

> >> sed -r -e 's/-[0-9].*//'
> >
> > Nust a note: sed has no option -r and 's/(.*)-[0-9].*/\1/' is a "garbled"
> > command. A corrected version would be 's/\(.*\)-[0-9].*/\1/'
> >
> > So the main question is: why do you use a non-existing option?
> >
>
> # sed --help
>
> Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
>
> ----- >8 snip
>
>   -r, --regexp-extended
>                  use extended regular expressions in the script.
>
> ----- >8 snip

You seem to miss the fact that you are using gsed instead of sed.

using -r makes scripts non-portable.

Jörg

-- 
 EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       j...@cs.tu-berlin.de                (uni)  
       joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily


Reply via email to