On Tue, Nov 16, 2004, Ralf S. Engelschall wrote: > On Tue, Nov 16, 2004, Michael Schloh wrote: >> - ntp_pidfile="@l_prefix@/var/ntp/ntpd.pid" >> + ntp_pidfile=`grep "^pidfile" @l_prefix@/etc/ntp/ntp.conf | sed -e >> "s;[^ ^t]*[ ^t]*\(.*\)$;\1;"` >> > Unfortunately there are three problems: the "^t" escape for a tab > character in a sed(1) regex is not sufficiently portable, the > backslashes in the sed(1) command would have to be escaped against > the surrounding double-quotes and the capturing regex also would > capture trailing whitespaces. I see no portable and at the same time > generic enough way to solve this with sed(1). Instead awk(1) works far > more reasonable here, hence I've fixed it with the construct: awk '{ > printf("%s", $2); }' > Yes, I'd considered these things and preliminary test proved the regex functional. Adding a dependency to sed(1) as in other packages is less appealing however, so I like your awk(1) based idea better as well. Thanks for the improvement.
-- Michael Schloh von Bennewitz <[EMAIL PROTECTED]> Development Team, Operations Northern Europe Cable & Wireless Telecommunications Services Tel +49-89-92699-227, Fax +49-89-92699-808
pgp66yAiYJZS2.pgp
Description: PGP signature