Ask HN: Shell 脚本会复兴吗?
1 分•作者: sshadmand•7 天前
我以前也用过 shell 脚本,但主要是在有限的范围内,用别人的开源脚本来完成特定任务,或者偶尔用一次性的脚本来清理硬盘。<p>具有讽刺意味的是,现在人工智能在编码方面确实很出色,我发现自己“编写”的 shell 脚本反而变多了。<p>它们很稳定,可移植,并且几乎可以在我关心的任何环境中运行。人工智能很乐于生成它们,执行速度快,而且非常适合自动化。<p>最终,我构建了一套不断增长的自动化系统,围绕着简单的、交互式的 shell 脚本菜单,来处理我一直都在做的事情。当我想改进一个脚本、添加分支逻辑或调整行为时,我只需让 AI 修改脚本,然后继续。我有点喜欢这种方式。<p>对我来说,这感觉像是 shell 脚本的复兴。<p>好奇其他人是否也经历了同样的变化,或者我是否陷入了某种奇怪的怪圈/反模式。
查看原文
I’ve used shell scripts before, but mostly in a pretty limited way with other people’s open source scripts to do something specific, or the occasional one off to clean up a drive.<p>Ironically, now that agents are genuinely good at coding, I find myself “writing” more shell scripts.<p>They’re robust, portable, and work in almost any environment I care about. Agents are very comfortable producing them, they execute fast, and they’re great for automation.<p>What I’ve ended up with is a growing set of automations built around simple, interactive shell script menus that handle things I do all the time. When I want to improve one, add branching logic, or tweak behavior, I just ask AI to mod the script and move on. I kind of love it.<p>It feels like a shell script revival, at least for me.<p>Curious if others are experiencing the same shift or if I fell into some weird bubble/anti-pattern.