Read from stdout as a string.
Automatically calls quiet to disable echoing to stdout.
method
Read from stdout as a string.
Automatically calls quiet to disable echoing to stdout.
The encoding to use when decoding the output
A promise that resolves with stdout as a string
Read as UTF-8 string
const output = await $`echo hello`.text();
console.log(output); // "hello\n"
Read as base64 string
const output = await $`echo ${atob("hello")}`.text("base64");
console.log(output); // "hello\n"