Re: [PATCH] config: Add --quoted option to produce machine-parsable output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Lichtenheld wrote:

> On Mon, May 21, 2007 at 09:54:23PM +0200, Jan Hudec wrote:
>> On Mon, May 21, 2007 at 19:46:59 +0200, Frank Lichtenheld wrote:
>> > This option will enclose key names in quotes (") if they
>> > contain a subsection and then escape " and \. It will also
>> > escape line breaks in values. Together this should produce
>> > an easily parsable output.
>> 
>> That will lead to either eval (which runs perl parser and probably won't win
>> anything) or regexps (which is not big win over parsing the .ini directly
>> with them) on the perl side. IMHO only thing that would actually be faster is
>> NUL-separated entries.
> 
>> Either:
>>     KEY <NUL> VALUE <NUL>
>> 
>> or:
>>     KEY <TAB> VALUE <NUL>
> 
> Both subsection names and values can contain <TAB> characters, so the
> latter isn't possible.

But neither subsection names (even [section "subsection"] style) not key
names cannot contain newline <LF>. I.e.

        KEY <LF> VALUE <NUL>

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux