Re: sed: illegal option -- r when running bibexport.sh
beatnick wrote:
> Hi, I'm trying to run bibexport.sh on a LaTeX aux file to produce a
> subsetted .bib file. But when I run ./bibexport.sh it gets as far as
> creating the new .bib file but doesn't write anything to it. Instead I
> get the error:
>
> sed: illegal option -- r
> usage: sed script [-Ean] [-i extension] [file ...]
> sed [-an] [-i extension] [-e script] ... [-f script_file] ...
> [file ...]
>
>
> Can anyone tell me what I'm doing wrong? I've read the user guide,
> searched the web etc, am stumped.
Isn't -r a GNU extension to sed or something? And you're using a
Sun or a Mac perhaps?
The offending line seems to be
sed -r -e \
"/^ *[cC][rR][oO][sS][sS][rR][eE][fF] *= *[^,]+,?$/d" \
${TMPFILE}.bbl >> ${FINALFILE};
I'm not enough of an RE hacker to know if that really requires -r
or not: try removing the -r and see if it works.
///Peter
|