Re: [PATCH v4] json_writer: new routines to create data in JSON format

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

 



"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes:

> cat <<-EOF | sed "1,\$s/_/ /g" >expect
> { level1 ...
> ________{ level2
> Etc.
> EOF
>
> Providing you don't use _ elsewhere in the output. It's a bit hacky but works.

The trick is especially useful if your golden master has mixture of
SP and HT, as you can write the source in a way that helps readers
understand what is going on, and turn that with sed into what the
machines would want to see.  When used that way, I'd say it is not
"bit hacky but works", but actually is a beautiful solution ;-).



[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