0

I am using a remote supercomputer to run my c++ code, written in qt creator and build in Ubuntu. I try to run my code using Matlab dos command in order to run multiple copy of my c++ code using parfor. During running, each code I need to input password. Therefore, my question is: how should I pass password to command terminal in Ubuntu? I tried following code but it did not work.

sudo ./MyCode 10 <\$(read -sp "Password: " myPassword; echo $password)

sudo ./MyCode 10 ----> this command work but it require entering the password I want to get rid of entering password.

Thanks in advance.

DYangu
  • 505
  • 1
  • 5
  • 16

0 Answers0