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.

Seashells: Pipe output from command-line programs to the web in real-time

139 pointsby tjhillover 3 years ago

14 comments

kristopolousover 3 years ago
Just sayin&#x27; you can do something like this in bash out of the box... Don&#x27;t let me spoil the party though, the more the merrier.<p><a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;bash&#x2F;manual&#x2F;html_node&#x2F;Redirections.html" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;bash&#x2F;manual&#x2F;html_node&#x2F;Redirecti...</a><p>&quot;&#x2F;dev&#x2F;tcp&#x2F;host&#x2F;port If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding TCP socket.<p>&#x2F;dev&#x2F;udp&#x2F;host&#x2F;port If host is a valid hostname or Internet address, and port is an integer port number or service name, Bash attempts to open the corresponding UDP socket.&quot;<p>I&#x27;ve got an example of a &quot;practical&quot; way to use it in an answer I did over here <a href="https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;563083&#x2F;how-to-transfer-files-over-ssh-while-already-sshd-into-the-server&#x2F;1632961#1632961" rel="nofollow">https:&#x2F;&#x2F;superuser.com&#x2F;questions&#x2F;563083&#x2F;how-to-transfer-files...</a>
评论 #28903746 未加载
评论 #28905375 未加载
评论 #28905515 未加载
评论 #28906705 未加载
zinodaurover 3 years ago
Aww, what a great idea. I&#x27;d love to use a self hosted version of this for work, but there&#x27;s no way I could pipe my shell output to a 3rd party site, too many juicy secrets.
评论 #28902555 未加载
ec109685over 3 years ago
This would be even cooler if it could be end to end encrypted. E.g. client side it spits out a decryption key, and encrypts all traffic with it. Then on the browser, you paste that in and it will decrypt.<p>Obviously you have to trust the javascript to not do anything nefarious with your data, so maybe it’s not really adding much security.
评论 #28902587 未加载
matt_fover 3 years ago
Are there any legal security issues to be concerned about as a developer of this kind of anonymous service?<p>I wonder every time I see a project like this, namely anonymous or transient hosting of any kind of user data, whether the developers get any kind of flak from agencies claiming it could be used to nefarious ends.<p>Serving plain text is obviously less of a concern than hosting images, video, etc.<p>But I imagine the more anonymous a service is, the more attractive it is for use by unsavory actors.<p>Anyone have any thoughts?
评论 #28902260 未加载
评论 #28902754 未加载
ChrisArchitectover 3 years ago
(2019)<p>Anything new here?<p>Previous discussion:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20625440" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20625440</a>
testesttestover 3 years ago
You can&#x27;t self host? Piping server data to a remote untrusted server doesn&#x27;t seem appealing. Unless I am missed something?
评论 #28905819 未加载
评论 #28905622 未加载
globular-toastover 3 years ago
Something similar has existed in the Gentoo community for many years: wgetpaste [0]. Also I distinctly remember seeing something like this before which exactly the same minus the Python package (so you could only use netcat). wgetpaste is mostly for sharing debug information in IRC but I could imagine it being useful for many other ad hoc troubleshooting type things.<p>[0] <a href="https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Wgetpaste" rel="nofollow">https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Wgetpaste</a>
lioetersover 3 years ago
Piping Server is a similar (but more extensive) solution:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;nwtgck&#x2F;piping-server" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nwtgck&#x2F;piping-server</a><p><a href="https:&#x2F;&#x2F;dev.to&#x2F;nwtgck&#x2F;the-power-of-pure-http-screen-share-real-time-messaging-ssh-and-vnc-5ghc" rel="nofollow">https:&#x2F;&#x2F;dev.to&#x2F;nwtgck&#x2F;the-power-of-pure-http-screen-share-re...</a>
pixelbeat__over 3 years ago
For generally converting cli output to HTML see also <a href="https:&#x2F;&#x2F;github.com&#x2F;pixelb&#x2F;scripts&#x2F;commits&#x2F;master&#x2F;scripts&#x2F;ansi2html.sh" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pixelb&#x2F;scripts&#x2F;commits&#x2F;master&#x2F;scripts&#x2F;ans...</a>
enriqutoover 3 years ago
To be even more unixy, this needs a file interface &#x2F;dev&#x2F;sls that you can pipe directly to.
评论 #28904575 未加载
solarizedover 3 years ago
I prefer &amp;&gt; it into a file within virtual host or something. And access it in secure manner.
anyfactorover 3 years ago
I think the application of it is reasonable only when you are thinking of simple applications like Yes&#x2F;No notifier and not outputting logs. I wonder if it works well with TQDM so I can see the code execution progress bar.
ilakshover 3 years ago
Anyone know an easy way to force this to run in interactive mode or pty or whatever? I am trying to get color output from `bat` for example.
singularity2001over 3 years ago
The coolest feature idea that I will probably never use