I am using a expect script & i am unable to set 2 variable to the output file, I just want to name the file as required.
#!/usr/bin/env expect
set file [lindex $argv 0];
set date [exec date "+%d-%B-%Y"]
spawn sh -c "ssh -o StrictHostKeyChecking=no hostname < ./script.sh > /root/scp_output_$file_$date.txt"
Required output
/root/scp_output_A_21-September-2017.txt