I'm trying to make this work
#!/usr/bin/expect
spawn "(psql blabla \"blabla sql;\" &> /dev/null) && (pg_restore -d xx my_file.sql &> /dev/null)"
expect "Password for user my_base: "
send "v"
But I always get:
spawn (psql blabla "blabla sql;" &> /dev/null) && (pg_restore -d xx my_file.sql &> /dev/null)
couldn't execute "(psql blabla "blabla sql;" &> /dev/null) && (pg_restore -d xx my_file.sql &> /dev/null)": no such file or directory
What am I missing?