Afficher un message
Vieux 30/10/2006, 09h00   #6
Harald Hanche-Olsen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sed: illegal option -- r when running bibexport.sh

+ "Chris F.A. Johnson" <cfajohnson@gmail.com>:

| grep -E -v '^ *[cC][rR][oO][sS][sS][rR][eE][fF] *= *[^,]+,?$' \
| ${TMPFILE}.bbl >> ${FINALFILE};

which you ought to be able to simplify into

egrep -iv '^ *crossref *= *[^,]+,?$' \
${TMPFILE}.bbl >> ${FINALFILE};

AFAICT, the sed command that started the thread needed the GNU
specific -r option because sed regular expressions don't normally
support the special character `+'. But the grep ones do, hence no
need to use egrep. But doing so doesn't hurt, and it may be better to
leave it in just in case I'm wrong and some grep out there doesn't
support `+'.

--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
  Réponse avec citation
 
Page generated in 0,05263 seconds with 9 queries