loading...

Terminal Comand... to write code “inside” a file.JS file... how do you do that?

yobretyo profile image Bret ・1 min read

What is the terminal code to write “INSIDE” of a test.JS file?

Discussion

pic
Editor guide
Collapse
fullzero5 profile image
FullZero
echo "export const MyName = () => console.log('Myname = name')" > app.js
Enter fullscreen mode Exit fullscreen mode
Collapse
yobretyo profile image
Bret Author

It won’t let me put that into a “task” because it uses “” more then what’s allowed in a row.

Collapse
fullzero5 profile image
FullZero

I don't quite understand the context “task” - maybe you need to escape characters

Collapse
weirdmayo profile image
Daniel Mayovsky

By task do you mean cron task or something?
Just put that into a shell script and execute it instead