score:0

Using formatted strings can help with such problems

var nestedcmd = """/absolute_path/program -input $server_dir/filename"""

var cmd = """sshpass -p $server_pass ssh $server_user@$server_ip \$nestedcmd"""

Related Query

More Query from same tag