[LinuxSIG] ChatGPT to write code [was: Re: bash_httpd.sh]
Craig Miller
cvmiller at gmail.com
Sun Mar 3 13:30:13 PST 2024
Thanks for the pointer, Dave.
I have made a note of it. Hopefully my future bash code will be better
because of it.
Craig...
On 3/3/24 07:33, Dave Hylands wrote:
> There are still some things I prefer to use bash for rather than
> Python (usually involving transforming the output of a program). But
> yeah it’s amazing what you can do with a well crafted bash script.
>
> I tend to use trap a lot more in scripts that get used in a more
> production environment.
>
> I’ve also found myself putting the incantation:
>
> `set -Eeuo pipefail`
>
> at the top of all my bash scripts.
>
> This page gives an detailed explanation of most of what that means:
> https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425?permalink_comment_id=3935570
>
> The -E makes trap statements get inherited by shell functions.
>
> I find these options to be extremely useful, especially in build
> commands involved by make. Otherwise lots of failures were silently
> being absorbed rather than halting the build.
>
> Dave Hylands
> Peachland, BC, Canada
> http://www.davehylands.com
>
>
--
IPv6 is the future, the future is here
ipv6hawaii.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://vicpimakers.ca/pipermail/linuxsig_vicpimakers.ca/attachments/20240303/917bbbcf/attachment.htm>
More information about the LinuxSIG
mailing list