Dnia 2014-10-25, o godz. 13:28:54
Zac Medico <zmed...@gentoo.org> napisał(a):

> On 10/25/2014 01:25 PM, Michał Górny wrote:
> > Dnia 2014-10-25, o godz. 12:42:14
> > Zac Medico <zmed...@gentoo.org> napisał(a):
> > 
> >> On 10/25/2014 09:15 AM, Michael Palimaka wrote:
> >>> +eqalog() {
> >>> + local tag=$1 x
> >>> + shift
> >>> + for x in "$@" ; do
> >>> +         echo "${tag}" "${x}" >> "${T}"/qa.log
> >>> + done
> >>> +}
> >>
> >> Your patches look good to me, except that I think eqalog should escape
> >> any \n characters that might be embedded in the arguments.
> > 
> > Why? That sounds like some unsafe fancy feature only one person would
> > use. Embedding newlines in bash is trivial, why make them implicit with
> > a lot of added complexity?
> 
> Because the caller should not be concerned about the qa.log file format.
> The fact that it's delimited by newlines is an implementation detail
> that the caller need know nothing about. Escaping the new lines is
> really not all that complex. All of the elog functions have similar
> handling for newlines.

Oh, you mean converting from newlines to \n escapes? I thought
the opposite way, sorry then.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to