[LinuxSIG] ChatGPT to write code [was: Re: bash_httpd.sh]
Ron / BCLUG
admin at bclug.ca
Sun Mar 3 00:18:40 PST 2024
Ron / BCLUG wrote on 2024-03-03 00:14:
> Also, the `trap` might be incorrectly placed, but I played around with
> it, changed the location and the signals, couldn't get anything to work
> in the 10 or so minutes I tried to get it working...
On the other hand, this could be a user error.
I "sourced" the script instead of changing to executable.
There may also be shopt or `set` options that control how `trap` works,
but I don't care enough to investigate.
Honestly, I'm still amazed it's possible to write an http server in
bash, my first thought was, "can't be done".
Now, instead, I think "it shouldn't be done".
But on a minimally spec'd router, it makes sense and is a clever idea,
gotta admit.
rb
More information about the LinuxSIG
mailing list