Re: sed: illegal option -- r when running bibexport.sh
On 2006-10-29, beatnick wrote:
>
> Chris F.A. Johnson wrote:
>
>>
>> You are not doing anything wrong; bibexport.sh is using a
>> non-standard (GNU only?) option to sed. The guide should have
>> mentioned that.
>>
> hmm, i see. So whats the easiest way to make this work? Bearing in mind
> that my knowledge of Unix is minimal...
Replace sed with egrep (or grep -E):
Change:
sed -r -e \
"/^ *[cC][rR][oO][sS][sS][rR][eE][fF] *= *[^,]+,?$/d" \
${TMPFILE}.bbl >> ${FINALFILE};
To (untested):
grep -E -v '^ *[cC][rR][oO][sS][sS][rR][eE][fF] *= *[^,]+,?$' \
${TMPFILE}.bbl >> ${FINALFILE};
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
|