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.

Being a Good Unix Neighbour

36 pointsby leblancfgalmost 2 years ago

3 comments

somatalmost 2 years ago
<p><pre><code> &gt; Take for example this one-liner: &gt; [program listing...] &gt; In this condensed program of 4 lines, the following happens: </code></pre> Right a &quot;one&quot; liner I see...<p>once it gets above roughly 100 characters you are no longer allowed to call it a &quot;one liner&quot;<p>and style note putting the pipe&quot;|&quot; at the end of the command instead of the beginning acts as a natural break and lets you avoid the backslash escaped newline nonsense.<p><pre><code> curl ... | jq ... | awk .... </code></pre> vs<p><pre><code> curl ... \ | jq ... \ | awk ...</code></pre>
评论 #36121323 未加载
评论 #36123016 未加载
metadatalmost 2 years ago
That @click library is a lot less lines of code than the equivalent argparse boilerplate. That&#x27;s nice.
JdeBPalmost 2 years ago
Many of us are no doubt just waiting for the webmaster of www.example.com to realize that there&#x27;s a marvellous Bobby Tables SQL injection exploit in there. (-:<p>Being a good neighbour involves a bit more than reading from standard input and being about to send JSON to standard output; and there&#x27;s more to be said about the field parsing, including that fields must not contain interior whitespace, for which vis(1) encoding is a good idea.
评论 #36122194 未加载