How to use bash script variables in expect conditional statements
问题 I am writing a bash script and using expect to do sftp. Now in the expect block I want to access a bash variable in a conditional statement. but, I am unable to do so. Can somebody help in this. Also, the execution of this script is controlled from a c prograame and i wan't redirect the output to a log file (which again is dynamic). Can i do that and suppress all teh output on stdout here is the code !/usr/bin/bash host=$1 user=$2 pass=$3 action=$4 path=$5 echo "Starting...." function