Write an executable .sh file via fs.writeFileSync

Viewed 2178

Is there a way to write an executable shell script file using fs.writeFileSync

Fundamentally i'm trying to output a .sh file via a CLI and i want that .sh file to be executable so i do not need to manually run a chmod +x "filename" once the file gets outputted from CLI.

1 Answers
Related