`ExecForEach` 是否应以不同方式对参数进行清洁或转义?
作者: telemachus创建于 2023年8月21日更新于 2026年8月15日
After a recent conversation about script on Lobste.rs, I'm concerned about how ExecForEach handles arguments (especially filenames?) with tricky characters (e.g., spaces, single quotes, and double quotes). The current example for ExecForEach is ListFiles("*").ExecForEach("touch {{.}}").Wait(). I'll take that as a baseline, and start with the following minimal script:
内容来源: bitfield/script