Ah, now i know what you mean. Xml are very "friendly" to parse them with regexp :) (what if pidfile section will be commented in this way:
<!--
<pidfile>/var/run/jabber/sm.pid</pidfile>
-->
), grep doesn't help, mayby awk could help. Or xml tool, mayby xlllint.
xmllint --xpath /sm/pidfile sm.xml gives needed information. It needs RDEPEND to dev-libs/libxml2. Is it gentoo correct to use (for example) xmllint in init script?
Ah, now i know what you mean. Xml are very "friendly" to parse them with regexp :) (what if pidfile section will be commented in this way: /var/run/ jabber/ sm.pid< /pidfile>
<!--
<pidfile>
-->
), grep doesn't help, mayby awk could help. Or xml tool, mayby xlllint.
xmllint --xpath /sm/pidfile sm.xml gives needed information. It needs RDEPEND to dev-libs/libxml2. Is it gentoo correct to use (for example) xmllint in init script?