I want to copy a javascript code snippet into Nodejs REPL using shell script. For example
sum.sh
node // Here REPL open, I want copy below codes to this REPL and run
var num1 = 1
var num2 = 2
var sum = num1 + num2
sum
After run sum.sh, expecting result
3
Can we have a solution?