DenoDDeno
Powered by
herenicknameH
Denoβ€’2y 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()
const command = `
iptables -F
iptables -X
...and more more more...
`
const cmd = new Deno.Command(command)
const { stdout, stderr } = await cmd.output()


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


I tried calling
/bin/sh
/bin/sh
and passing the command as an argument, but the error doesn't change. How can I avoid this?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

how can I enable Deno vscode all inlay hints at once?
divyDdivy / help
4y ago
`fetch` request always fails once
KaKi87KKaKi87 / help
4y ago
Organizing dependencies in workspace with several project folder
CarereCCarere / help
3y ago
How to only load worker once
SkepticMysticSSkepticMystic / help
2y ago