herenicknameH
Denoβ€’17mo agoβ€’
1 reply
herenickname

Several commands at once

const command = `
iptables -F
iptables -X
...and more more more...
`
const cmd = new Deno.Command(command)
const { stdout, stderr } = await cmd.output()


command contains 15 large iptables commands that I want to execute on my local machine. When using the exec() function from the npm:ssh2 package, everything works, but Deno.command returns stderr File name too long (OS error 36)

I tried calling /bin/sh and passing the command as an argument, but the error doesn't change. How can I avoid this?
Was this page helpful?