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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

50th Anniversary Of '|'

31 点作者 nolta大约 2 年前
Apparently today is the 50th anniversary of using &#x27;|&#x27; for connecting shell pipelines. It was introduced in v4 of the Thompson shell, whose manpage is dated 1973-04-18 [1]. Previously the syntax for &#x27;a | b&#x27; was `a &gt;b&gt;` [2].<p>[1]: https:&#x2F;&#x2F;www.in-ulm.de&#x2F;~mascheck&#x2F;bourne&#x2F;v4&#x2F;<p>[2]: https:&#x2F;&#x2F;www.in-ulm.de&#x2F;~mascheck&#x2F;bourne&#x2F;v3&#x2F;

3 条评论

ralferoo大约 2 年前
Interesting that both | and ^ were supported, but | took over and ^ is still unused by the shell.<p>I wonder if ^ was deprecated because of the likelihood it&#x27;d be commonly used at the start of a regexp for grep, but | used to provide alternatives in a regexp was probably much less frequently used and so having to quote is was less of a problem than for ^.<p>Also interesting that the v3 format had both input and output filters, which is just semantic repositioning of the commands.
评论 #35630202 未加载
surprisetalk大约 2 年前
Happy anniversary!<p>I&#x27;m not sure if it&#x27;s true, but I&#x27;ve heard that the inspiration for Unix pipes came from APL.
AITree大约 2 年前
congratulations on 50 th aniversary of &quot;I&quot;