GPT-4 is very capable, the resulting bash scripts work well about 95% of the time. However there are often subtle bugs or edge cases that aren’t handled unless you explicitly tell it to look out for them.
After a few iterations of adding extra details to handle edge cases you can get something very high quality.
Results are much worse on open source LLMs but they’re catching up quickly.