how to escape unusual/uniq characters from expect scripts?
问题 in expect script I can set any command or character to run it on remote machine but the sad thing is that expect cant send the same character as they defined in the expect script for example I want to run this line from expect script in order to change IP address from 10.10.10.10 to 1.1.1.1 expect # {send "perl -i -pe 's/\Q10.10.10.10\E/1.1.1.1/' /etc/hosts\r"} but when I run the expect screen actually I see this line runing on the console: [root@localhost ~]# perl -i -pe 's/Q10.10.10.10E/1.1