Artificial intelligent assistant

Unable to execute bash script inside expect script i have a expect script like #!/usr/bin/expect ..... spawn passwd expect "password:" send "password" .... .... .... ~/test.sh Wile executing this, I'm unable to run bash script `test.sh`. How to execute Linux commands/bash scripts inside Expect script?

To begin with you should use `spawn` to run your script, and I'm not certain the tilde construct will be interpreted by expect.


spawn /bin/bash /home/username/test.sh


You should have error messages when this happens, you should add the to your question if you do not understand them.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8dd9dab5dd21311c285a5ff68fbb3eae