Need help?
<- Back

Comments (59)

  • harrisi
    It's so interesting to me how people consider writing bash scripts to be some sort of absurdist gimmick. I've made some scripts like this for blogging, as well as many other things.It's often not the best choice. There are situations where, I'd argue, it is. One of the main reasons, in my experience, is for very lightweight servers. I don't want python or node or anything. I want to run a web server with 128mb of ram and a 1gb disk. Somewhat niche, but it's useful to just use the base system.The other useful thing about it is knowing your shell in general. Even if you're not on the infrastructure team, being comfortable knowing how to navigate a system is both fun and sometimes critical. You never know when you'll need it, and it's an interesting look into your tools.It's akin to saying "why know how to use a saw when you can use a chainsaw" or "why know how to make a fire when you can use lighter fluid and a lighter?" Sometimes things come up. And it's fun to know how we got to where we are today.
  • felooboolooomba
    A single 1200 line bash script to create blogs.I love bash for quick hacks. I abhor it for things like this.
  • trebaud
    Not a bash script, but I built my own small blog generation engine to use with AI agents if anyone is interested https://github.com/trebaud/let-an-agent-build-your-blog
  • amaze_28
    bash script for blogs is a clever idea but writing in terminal might not be. an alternative angle : script that reads local .md file and deploys it might work well.
  • hkt
    Glorious.I used a similar system back in the day, nanoblogger:https://nanoblogger.sourceforge.net/
  • hyperionultra
    Mmm, good ol’ bash. I like it.
  • _ache_
    I used to do that. Them move to a NodeJS script.Because bash is maybe worst than C for this task.
  • chiply314
    Its time to invent something lightweight and good which runtime is so small that it becomes a system default.like a microvm with normal language features. Something you can and want to actually attach a debugger onto it. Something independent of architecture too.I just hate bash :| Even just using bash and curl and checking if its a website or an error page...
  • 4mitkumar
    Oooh..reminds me of something similar I did earlier for own blog a few years back: https://github.com/proxygeek/publish/I have moved away to Jekyll again but there's always something alluring about single file things - single file webapps, single file LLMs (llamafile) and others
  • bluebarbet
    This is a good example of a program I would like to use if it was distributed in the standard repo of my OS, rather than totally unvetted on the Microsoft Github page of a random developer.PS: I don't know why HN allows downvoting seeing how it is always so abused. Nothing I wrote here is factually false, and what remains is just my personal opinion as a principled user of FOSS. A bit of tolerance for others' viewpoints is in order.
  • iLoveOncall
    Nice idea but I don't understand why people write bash scripts more than a few lines long.There's absolutely 0 advantage, especially when AI can write simple code like that easily, over using any other language. It makes reading and maintaining much more complex.Hell, even GitHub's syntax highlighting (and VS Code's) breaks in many places throughout the script. It's just a terrible developer experience, even for your own scripts that nobody else will ever touch.Some people will say that the advantage is that you don't need to install another runtime, but even this is wrong as the script uses bash, not sh.I hate Python with a passion, but I'd gladly take it over bash for any of those scripts.
  • kevinten10
    [dead]