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.

    • tvcvt@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      4 months 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)

  • vas@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    4 months 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.

    • ScoffingLizard@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      6 hours ago

      I have a tough time reading man pages. It seems to be harder since everything went to systemd. After 20 years of Linux use, I still feel really dumb. I’m just now getting better with Vim keying.

      Is there a trick to reading man page formats? I’m a bit autistic and not an intuitive communicator. Sometimes I wish man pages had more example commands. I also wish there was a way to freeze the format at the top while scrolling options so I didn’t need to have 3 windows open to see format, scroll options, and have another open for actually typing.

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

        Unfortunately I don’t think I know the answers to your questions. I do what you say: open one or multiple tabs in my terminal emulator if I need to read multiple parts at the same time. I press / and then type in some case-sensitive text if I want to search for occurrences of this text. Or I press ? and some text to search backwards. And the rest I “lamely” do with pressing up-down arrows…

        Learning by example is exactly the second layer I’m referring to in my text above. Man pages are very… formal. If I don’t yet understand what they even talk about, I need examples before their concepts become “native” to me.

        I can’t “teach” well really - but I’m explaining how this works for me. I used to hate man pages, now I love them. Even a very difficult one like man bash. There is a point in the learning curve where it gets a lot better…

  • moonpiedumplings@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months 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.

  • JTskulk@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months 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.