0

I have a shell command "/var/tmp/shcommand" which interactively accepts 3 parameters(press enter after each parameter).Will the following commands work?

cat <<EOF |
    param1
    param2
    param3
EOF
/var/tmp/shcommand
vaj oja
  • 1,151
  • 2
  • 16
  • 47
  • yes it is working , why you are doing it complex way? Please refer the below link [link]http://stackoverflow.com/questions/2500436/how-does-cat-eof-work-in-bash – Shravan Yadav Jul 20 '15 at 12:06
  • because i dont have permission to change /var/tmp/shcommand but just call it. Is there another way to make the calling simpler? – vaj oja Jul 21 '15 at 05:47
  • you can create a parmfile which contains param1, param2,param3 in 3 lines and call the script like /var/tmp/shcommand < parmfile You can change he parmfile whenever you want. – Shravan Yadav Jul 21 '15 at 06:12

0 Answers0