I have a script_1 in bash which executes a script_2 in bash but using expect
/usr/bin/expect -c " set timeout 1 spawn su - $usr -c '/tmp/script_2' expect \"Password: \" send \"$pass\r\" interact "
$usr and $pass I capture them with osascript inside script_1
when executing the app it executes the line: spawn su - $usr -c '/tmp/script_2'
but it waits about 10 seconds then it shows the output "Password: " and immediately the app finishes the execution.
It will be that platypus when detecting a stdin signal automatically cuts the execution of the app?
can expect be used inside app built with platypus?
script_1 is executed with a user1, then inside script_1 it executes expect to call script_2 but with the environment of another user, which would be user2
I have a script_1 in bash which executes a script_2 in bash but using expect
/usr/bin/expect -c " set timeout 1 spawn su - $usr -c '/tmp/script_2' expect \"Password: \" send \"$pass\r\" interact "
$usr and $pass I capture them with osascript inside script_1 when executing the app it executes the line:spawn su - $usr -c '/tmp/script_2'
but it waits about 10 seconds then it shows the output "Password: " and immediately the app finishes the execution.It will be that platypus when detecting a stdin signal automatically cuts the execution of the app? can expect be used inside app built with platypus?
script_1 is executed with a user1, then inside script_1 it executes expect to call script_2 but with the environment of another user, which would be user2