How can I get the command output from the buffer? Current'y it's just saying (buffer).Here is my script and debug output:#!/bin/bash -xwhile read p; doecho $p{    /usr/bin/expect -d << EOF    match_max 10000    spawn ssh anthony@$p    expect password:    send MyPasswordHere\r    expect      send ifconfig |grep -i eth0\r    expect      puts The output is $expect_out(buffer)     send exit\rEOF}done <List.txt+ read p+ echo localhostlocalhost+ /usr/bin/expect -dexpect version 5.45argv[0] = /usr/bin/expect  argv[1] = -d  set argc 0set argv0 /usr/bin/expectset argv executing commands from command filespawn ssh anthony@localhostparent: waiting for sync byteparent: telling child to go aheadparent: now unsynchronized from childspawn: returns {2032}expect: does  (spawn_id exp15) match glob pattern password:? noanthony@localhost's password: expect: does anthony@localhost's password:  (spawn_id exp15) match glob pattern password:? yesexpect: set expect_out(0,string) password:expect: set expect_out(spawn_id) exp15expect: set expect_out(buffer) anthony@localhost's password:send: sending M00nsh0t@\r to { exp15 }expect: does   (spawn_id exp15) match glob pattern  ? yesexpect: set expect_out(0,string)  expect: set expect_out(spawn_id) exp15expect: set expect_out(buffer)  send: sending ifconfig |grep -i eth0\r to { exp15 }expect: does  (spawn_id exp15) match glob pattern  ? noexpect: does \r\n (spawn_id exp15) match glob pattern  ? noWelcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-40-generic x86_64) * Documentation:  https://help.ubuntu.com/Last login: Sun Dec 21 09:23:38 2014 from localhostexpect: does \r\nWelcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-40-generic x86_64)\r\n\r\n * Documentation:  https://help.ubuntu.com/\r\n\r\nLast login: Sun Dec 21 09:23:38 2014 from localhost\r\r\n (spawn_id exp15) match glob pattern  ? yesexpect: set expect_out(0,string)  expect: set expect_out(spawn_id) exp15expect: set expect_out(buffer) \r\nWelcome The output is (buffer) send: sending exit\r to { exp15 }+ read p
Expect script buffer output not showing
bash;expect