TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Convert json dns data to csv

1 pointsby textmodeabout 7 years ago
cat json.l<p><pre><code> #define echo ECHO #define jmp BEGIN #define p printf #define nl p(&quot;\n&quot;) #define s p(&quot;,&quot;) %s xa xb xc xd xa &quot;\&quot;Question\&quot;:[{\&quot;name\&quot;: \&quot;&quot; ya &quot;\&quot;, \&quot;type\&quot;: 1}],&quot; xb &quot;\&quot;type\&quot;: 1,&quot; yb &quot;\&quot;data\&quot;: \&quot;&quot; xc \&quot; %% {xa} jmp xa; &lt;xa&gt;{ya} s;jmp xb; &lt;xa&gt;. echo; &lt;xb&gt;{xb} jmp xc; &lt;xb&gt;. &lt;xc&gt;{yb} jmp xd; &lt;xc&gt;. &lt;xd&gt;{xc} nl;jmp 0; &lt;xd&gt;. echo; \n . %% int main(){ yylex();} int yywrap(){} &#x2F;* compile with something like: flex -Crfa -8 -i json.l cc -pipe lex.yy.c -static -o json usage example: json &lt; file.json &gt; file.csv *&#x2F;</code></pre>

no comments

no comments