There is lots of books, videos and manuals about bash. So it is hard to tell if one is good or not. By advanced bash I mean regular expressions, complex scripts, and kind-of obscure options of basic commands no beginner tutorial tells about.

  • JTskulk@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 minutes ago

    Everyone here is throwing resources about where to learn more about Bash instead of answering the question. I’d say regex is good to learn regardless as it’s pretty much used everywhere, but advanced bash scripting probably isn’t worth the trouble unless you’re using sysvinit scripts or something. Bash was really the first language I learned and nowadays I find myself starting scripts in bash and then quickly converting over to python the moment I have to manipulate strings. Python is much more straightforward in that regard.

  • vas@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    1 hour ago

    My personal basic tools for learning:

    • man bash. That’s the documentation for everything. It’s very careful and serious though, so sometimes you need…
    • Search in internet if you think your particular question is very “repeatable”. Stackoverflow used to be good, but now they’re all “AI AI AI by the way have you heard about AI?”. So I’m not recommending it anymore. For “advanced bash” there are pages that go over those “advanced topics”, too!
    • Run shellcheck to read your code and give suggestions/warnings. It’s a great tool for learning, too, besides the primary goal of reviewing code to be production-ready.
    • Sometimes, with extreme care, ask an LLM to review your code or give siggestions. It tends to hallucinate a lot, makes up wrong and unexisting stuff, but sometimes it’s useful, too. Especially at finding bugs. Again, it can be useful, but use with care. Oh, and it can actually be great at explaining, too. Throw it some syntax/code and it’ll explain wtf is going on. This part is very reliable and good.

    At my current level of experience I need mostly man bash, and occasionally all of the rest. Before I used a lot of stackoverflow and simply thinking of what I even want.

    • tvcvt@lemmy.ml
      link
      fedilink
      arrow-up
      5
      ·
      5 hours ago

      For learners who are helped by seeing someone think through a problem and explain why they made the choices they did it doesn’t get much better than YSAP. (Here’s the link: ysap.sh)

  • Franconian_Nomad@feddit.org
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    3
    ·
    3 hours ago

    Shh, LLMs are quite good at stuff like this. Let them teach you. Use a command line harness like opencode or whatever tickles your fancy.

    Use a local model like Qwen 3.6 if you can, and start having fun. You might to have to learn how to use a LLM effectively though, to mitigate their disadvantages like hallucinating and their non-deterministic nature. Also, they want to do everything with curl, maybe find some alternatives to that.

    • Eggymatrix@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      arrow-down
      4
      ·
      3 hours ago

      Seconded. I have worked on linux for 15 years doing software dev and some IT. Nobody knows that stuff in detail unless they have to because of some arkane deployment reason. Any half good local llm will be miles ahead of most books. Tell it what you need, it will spit out some code, understand the code and ask it or search online how it works exactly. Rinse and repeat.

  • moonpiedumplings@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 hours ago

    Overhewire bandit is a tutorial and introduction to CTF’s. It covers some of the lesser known commands like strings or uniq, by making you use them in challenges. Of course, it later goes on into basic exploits. But it’s a good intro to some of that stuff, and I like that it’s hands on.

  • a_fancy_kiwi@lemmy.world
    link
    fedilink
    arrow-up
    3
    arrow-down
    8
    ·
    edit-2
    4 hours ago

    I run Qwen2.5 Coder 14B locally for boiler plate stuff that I then edit myself and it’s been great. I write code irregularly so using an LLM is nice when I know what I want to do, how to logically do it, but I’ve since forgotten the syntax.

    Edit: I figured this would be a little contentious. If you write scripts so often that you feel like it’s worth it to invest time in becoming better at them, then by all means. This is just a hobby for me. As much as I’d love to do so, investing time in getting better at scripting is unfortunately a waste.