#1239 closed defect (fixed)
Fontconfig: Simplified sed command
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
The following sed command (from Fontconfig installation page) sed -i.orig \
-e "/CATALOG \/etc\/sgml\/OpenSP-1.5.1.cat/d" \ /etc/sgml/catalog \ /etc/sgml/sgml-docbook.cat
can be simplified to sed -i.orig \
-e "\%CATALOG /etc/sgml/OpenSP-1.5.1.cat%d" \ /etc/sgml/catalog \ /etc/sgml/sgml-docbook.cat
Change History (5)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Oh wow, this is much simpler.
It removes two whole backslashes from the command.
:-)
comment:3 by , 20 years ago
Kevin: No, it's used this way. See this example: cat << "EOF" | sed '\%line1%d' line1 line2 EOF It will print "line2". Actually, It's not a shell escape, but a sed syntax. The single quotes disabled the shell scapes. Randy: Actually, I meant "clearer", not simplified... IMHO, It's easier to read the command without all that escapes.
comment:4 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The final '%' in your proposed command is not escaped; is that an error?