Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Writing bash scripts to automate various parts my workflow

Would you share some of those? Bash is fraught with gotchas and intricacies and seldom have I read Bash code where I couldn’t immediately spot flaws. There’s often something which left unchecked may come back to bite you later.

I’m skeptical the LLM code would be any better, since it’s (presumably) trained on a corpus of subpar code. But I could be wrong.



Give the LLM access to `shellcheck` and have it iterate on the warnings. I think promising results have been shown when you allow LLMs to reflect on their answers and give them access to tools.


Shellcheck can't check everything though. I think using LLMs on difficult to verify code like shell scripts and complex regexes is a pretty bad idea.

I've found them useful as a "smart search engine", e.g. if I don't even know the magic terms to search for.

Most of the time it gives me answers that are completely wrong, but are close enough that I know where to look to find the right answer.

E.g. "Using the rapidcheck C++ test framework, how do you test a function that takes two vectors, one of which must be exactly 8 times as long as the other."

It gets it wrong but it still helped. I definitely wouldn't want to use its output unquestioningly though.


Depends entirely on if the shell script is mission critical. I couldn't care less about the quality of my LLM shell scripts most of the time. My only success criteria is that is that it solves a problem. These are scripts I'm never going to touch again, things like batch converting files, or like one time I had it generate a script to titrate stable diffusion parameters. As long as I can skim the output and see that its correct I'm happy.

You call it a bad idea, but it's saved me hours of work.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: