News for hackers. Stuff that matters.
Re:Bashttpd - An http server in bash by sarnowski on Sunday September 16, 2012 @08:56AM (#4529069)
Why not using /bin/sh? Didn't saw a bash specific tool (except the function syntax which is easy to convert). And if you really want to use bash, please use #!/usr/bin/env bash so that it is more compatible.
Re:Bashttpd - An http server in bash by avleenvig on Sunday September 16, 2012 @11:48AM (#4529350)
It's likely I'll want to do some more complex stuff in bash, rather than pure sh. My preferred shell is zsh but of the more advanced shells, bash is the most prevalent.

I've pushed the change to use /usr/bin/env bash :-)

Re:Bashttpd - An http server in bash by Zr40 on Sunday September 16, 2012 @11:11AM (#4529274)
What kind of environments contain bash in a different location than /bin/bash, and why is it done that way?
Re:Bashttpd - An http server in bash by DeadButDreaming on Sunday September 16, 2012 @11:20AM (#4529286)
FreeBSD for example does not have bash installed by default since bash is not part of FreeBSD operating system and when it is installed (using ports or packages) it's installed into /usr/local where all other 3rd party software is installed.
Re:Bashttpd - An http server in bash by napum on Sunday September 16, 2012 @11:16AM (#4529279)
Some systems use /bin and /sbin as directories containing binaries capable of being used in single-user mode (where only / is mounted), meaning a pretty bare experience. root's shell would probably not be bash in this case and bash would probably be optional/a package and would be installed elsewhere.
Re:Bashttpd - An http server in bash by Presence on Sunday September 16, 2012 @11:15AM (#4529278)
FreeBSD users have bash added in and so is located at /usr/local/bin/bash
Re:Bashttpd - An http server in bash by sarnowski on Sunday September 16, 2012 @11:20AM (#4529284)
Correct, in my case its OpenBSD which stores all "third-party" packages in /usr/local
Re:Bashttpd - An http server in bash by michaelcampbell on Monday September 17, 2012 @08:40AM (#4532239)
> please use #!/usr/bin/env bash so that it is more compatible.

Presuming env is in /usr/bin, thus obviating the compatible argument somewhat.

Re:Bashttpd - An http server in bash by Shish2k on Sunday September 16, 2012 @01:58PM (#4529732)
Apart from when you're on red hat or a derived distro, where the command would need to be "#!/bin/env bash"...