• [gentoo-user] Re: Books about making shell scripts and other nifty comm

    From Nuno Silva@21:1/5 to Eli Schwartz on Fri Jun 6 16:20:01 2025
    On 2025-06-05, Eli Schwartz wrote:

    On 6/5/25 12:16 PM, Mark Knecht wrote:
    <hehe>

    I sense a certain overriding fear about the future...

    </hehe>


    I'm not worried about the future, I'm worried about today, and today's
    users seeking help and getting led astray.


    To each his own. I agree with you in general - don't trust AI with
    anything important. If you prefer then 'trust but verify'.


    I don't consider AI to provide value enhancement for me at all, for much
    the same reason as described at

    https://infosec.exchange/@david_chisnall/113690087142854474

    It saves time on writing code. It costs *more* time in debugging subtle
    edge cases. This is a steep disadvantage for a technology that is full
    of questions about legal liability!

    Of course, your mileage may vary... if it's only for personal use you
    may not care about legal liability, and if you couldn't write it
    yourself at all then maybe the debugging is worth it.

    Edge cases, corner cases, implementation details and non-portable
    features are reasons why you'd want to *avoid* "GenAI" for shell
    scripting.

    I'd say a bit of shell scripting is being aware of what the conditions
    to be careful with are. That sounds precisely like the kind of thing at
    least some public GenAIs might fail at. Possibly even if you stick to
    GNU bash and Linux (which shouldn't be a problem unless you plan on your scripts being used on other systems).


    I can't forget the moment when I got a GenAI telling me how to use
    killall to kill processes *by name* in Solaris [1]. That said, maybe
    that public model was defective, given it claimed the white side of a
    Space Shuttle Orbiter goes *down* on top of a carrier aircraft...

    [1] https://social.sdf.org/@njsg/113130981279894435

    --
    Nuno Silva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nuno Silva@21:1/5 to Eli Schwartz on Sun Jun 8 02:20:01 2025
    On 2025-06-05, Eli Schwartz wrote:

    On 6/5/25 2:48 PM, Arve Barsnes wrote:
    On Thu, 5 Jun 2025 at 19:56, yahoo <[email protected]> wrote:
    Advanced Bash-Scripting Guide (https://tldp.org/LDP/abs/html/)

    Available for free online so you can see if all you need is in, or in
    printed version from various resources. Full of code snippets to get you >>> started.

    Also the bash book from the bunch of programming books created by the
    StackOverflow bunch a few years ago. I remember those got good
    feedback.

    https://goalkicker.com/BashBook/

    Regards,
    Arve


    https://mywiki.wooledge.org/BashGuide is a must-read, I would say. In
    fact, the entire wiki is an excellent reference manual for both
    beginners and knowledgeable developers.

    Seconded, it's the reference I was going to suggest in this thread. It
    has not only documentation on at least some Bash features, but also
    content about the details one might have to worry about (such as looping
    over file names). Random examples:

    https://mywiki.wooledge.org/BashPitfalls
    https://mywiki.wooledge.org/BashFAQ
    https://mywiki.wooledge.org/ParsingLs
    https://mywiki.wooledge.org/DontReadLinesWithFor
    https://mywiki.wooledge.org/BashGuide/Arrays

    The person who asked for suggestions is focused on GNU bash, but this
    wiki also has content on portability

    https://mywiki.wooledge.org/Bashism

    --
    Nuno Silva

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)