I'm trying to execute a basic bash script from node using the exec()
function. The bash script is as follows:
#!/bin/bash
ffmpeg -f concat -i <(for f in $1/*.mov ; do echo "file '$f'"; done) -c copy $1/output.mov
The script works fine running it from the command line but when running from within node I get a syntax error: line 2: syntax error near unexpected token
('`
It appears when running this command node it attempting to use sh
instead of bash
. Can anyone verify this is true and give a possible workaround or solution? Thanks ahead of time!