4 ms·
> Now, since the particular problem doesn't require a shell at all, you can solve it entirely in find: find . -name data.json -execdir mv {} data.yml \; Ho
by wodenokoto 4y ago
> Now, since the particular problem doesn't require a shell at all, you can solve it entirely in find:
find . -name data.json -execdir mv {} data.yml \;
How do you do that without a shell?
- maxloh 4y agoIIRC running a command without piping/string semantics doesn't involve a shell, such as os.system() in python and child_process.exec() in Node.js.
- Arch-TK 4y agoI mean obviously you need some way of executing the command and you're probably not going to write a C program to call execve to do it, but the point is that it doesn't involve any shell features and aside from the escape syntax for the semicolon is completely shell independent.