What is wrong with "python -m http.server"?
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
Bashbro – Make Any Comp a Web-Based File Server
31–40 of 52 posts
Re: Bashbro – Make Any Comp a Web-Based File Server
#32I re-read "Make Any Comp a Web-Based File Server" 10 times and I don't understand what it means. Specifically the word "Comp". What does this mean?
I think it's just what 12 year olds call a computer. A comp-u-ter.
("cal" obviously stands for "calculator")
Re: Bashbro – Make Any Comp a Web-Based File Server
#33This is cool, but there's currently an overload of ports assigned on my system. Is there a way to manage all these port numbers? And why can't we use strings, even if just locally? And what do people use to allocate port numbers in a way that you'll never get clashes?
Re: Bashbro – Make Any Comp a Web-Based File Server
#34Earlier quoted context omitted.
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
I solved that problem some time ago with netcat, „coproc nc -l -p PORT“. Makes bash listen to nc‘s stdout and let’s it write to it‘s stdin. But nc is not bash.
https://gist.github.com/alganet/140c7c12d1603c244a01
nc is almost everywhere, you can count on it.
Ultimately, this is a toy, but it can be handy. I originally made it to attempt using for serving config for networked debian unattended installations[1] while automating VM creation, but never went that far.
[1]: https://debian-handbook.info/browse/en-US/stable/sect.automa...
Re: Bashbro – Make Any Comp a Web-Based File Server
#35Re: Bashbro – Make Any Comp a Web-Based File Server
#36Re: Bashbro – Make Any Comp a Web-Based File Server
#37What is wrong with "python -m http.server"?
It requires Python. Bashbro, on the other hand, seems to require socat. I wonder if there's any bash-istic method of listening to a port...
edit:
https://unix.stackexchange.com/questions/49936/dev-tcp-liste...
gives some pointers
Re: Bashbro – Make Any Comp a Web-Based File Server
#38Re: Bashbro – Make Any Comp a Web-Based File Server
#39This is cool, but there's currently an overload of ports assigned on my system. Is there a way to manage all these port numbers? And why can't we use strings, even if just locally? And what do people use to allocate port numbers in a way that you'll never get clashes?
Re: Bashbro – Make Any Comp a Web-Based File Server
#40In a slightly more heavyweight category I've settled on dufs for my single binary file serving / uploading / password-protecting needs. https://github.com/sigoden/dufs
Ok, checked it out, dufs is a cool tool. Definitely replaces python -m http.server. This is a new standard rightalong side ripgrep.
Cargo is the package manager that pip wanted to be. We should just use cargo anyway. Why have distros when you have Cargo? Why have homebrew when you have Cargo?
Dufs support of webdav is nascent.
I kid, but only a little bit.