Created
July 26, 2020 12:47
-
-
Save piyushchauhan2011/bc951f036ec8cfae4e29b8d402a145f5 to your computer and use it in GitHub Desktop.
Heredoc with Deno.run cmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let p = Deno.run({ | |
cmd: [ | |
"sh", | |
"-c", | |
` | |
echo hello | |
echo hello2 | |
cat << EOF | |
pwd: $PWD | |
EOF | |
`, | |
], | |
}); | |
const { code } = await p.status(); | |
p.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref: https://linuxize.com/post/bash-heredoc/