passing parameters into a node cli command

25 views
Skip to first unread message

Mark Edwards

unread,
Jan 12, 2018, 2:52:08 PM1/12/18
to nodejs
hello -

i have a linux command installed that was written in jScript/node.  when i run the command at the command line, it might look like this:

$ nodeCommand     parmOne    parmTwo  ;

the command then proceeds to prompt me for several other "inputs".  i would like to run this node command from a script.

is there any way to pass the input-prompts into the command?  i have tried every combination i can think of using syntax similar to this:

echo -e <<EOF |  nodeCommand   parmOne  parmTwo ;
keyboardInputOne
keyboardInputTwo
keyboardInputThree
EOF

any help is appreciated.  thanks in advance.


Mark Edwards

unread,
Jan 13, 2018, 3:04:44 PM1/13/18
to nodejs
tcl-expect does what i need.
Reply all
Reply to author
Forward
0 new messages