I have an array like this:
var array = ['File Name', ...]
I'm executing unix commands like this:
for (const item of array) {
execSync(`convert -trim ./original/${item}.png ./trimmed/${item}.png`)
}
Here I get an error because unix format spaces like this File\ Name. So, in my code, the script can't file the original file.
What is the usual way to handle this?
execSync(`convert -trim "./original/${item}.png" "./trimmed/${item}.png"`)