TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Writing a Language Server in Bash

1 点作者 tpetr超过 1 年前

1 comment

mdaniel超过 1 年前
<p><pre><code> # Capture the content-length header value [[ &quot;$line&quot; =~ ^Content-Length:\ ([0-9]+) ]] </code></pre> Be forewarned that the space after any http header is optional &lt;<a href="https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc9112#name-field-syntax" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc9112#name-field-syntax</a>&gt; so require it in your match at your peril. And, of course, http headers are case insenstiive so checking for the upper in <i>any</i> position is rolling the dice<p><pre><code> id=$(echo -E &quot;$json_payload&quot; | jq -r &#x27;.id&#x27;) </code></pre> that answers my question about how &quot;in Bash&quot; was going to deal with all the json