I am invoking matlab in unix terminal-A with below commandline.
matlab -nosplash -nodisplay -nojvm -nodesktop -r "try;myfunc;end;quit"
myfunc.m file has artype = input('Press 1 for add: \n')
I use process ID and pass the input to matlab from a terminal-B using
echo "1" > /proc/<processID of MATLAB>/fd/0
1 is successfully passed to matlab running in terminal-A. However, since matlab input() expects carriage return to execute next line in .m file. How do I pass carriage return to matlab from unix terminal-B?