[j-nsp] Ansible juniper_junos -add license module?

Jean Benoit jean at unistra.fr
Mon Mar 26 07:49:40 EDT 2018


On Sun, Mar 25, 2018 at 03:59:14PM +0100, adamv0025 at netconsultings.com wrote:
> [...]
> If not how can I send ^D (ctrl+D a.k.a end of file) in expect script please?


	# ASCII 4: EOT (end of transmission)
	set ctrlD \004

	send $ctrlD

-- 
Jean
-------------- next part --------------
#!/usr/bin/expect

set host "myhost.example.com"

set ctrlD \004
set prompt {.* \$}

spawn ssh $host

expect -re $prompt {
  send "ls\r"
}

expect -re $prompt {
  send $ctrlD
}

expect {closed}


More information about the juniper-nsp mailing list