How to automatically log in to a specified directory by iterm

at present, I am implementing such a shell, that can successfully log in without secret, but cannot cd to / data/bak/log, for advice

-sharp!/usr/bin/expect

set timeout 30
spawn ssh -p [lindex $argv 0] [lindex $argv 1]@[lindex $argv 2]
expect {
        "(yes/no)?"
        {send "yes\n";exp_continue}
        "password:"
        {send "[lindex $argv 3]\n"}
        send "cd /data/bak/log\r"
}
interact
Mar.20,2021

after send completes the password, you should expect something instead of send "cd" directly, such as waiting for a command prompt, otherwise the cd command will be sent too early.



does anyone know? It hasn't been solved yet

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31e1d-2bdc7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31e1d-2bdc7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?