I want execute some command(eg,pwd) by ssh.

```
ssh root@jump pwd

```

I use expect to wrap it,So it become "e" command, it works well.

```
./e jump

```

But output was missing after pipe,can not display result of "pwd" command

```
cat list.txt | xargs -I xx ./e xx

```

**here is the e script**

```
[root@jump tmp]# cat ./e
 expect -d -c '
        spawn   ssh root@'$1' pwd
         expect "*assword:" {
          send "r41\r"
          sleep 1
        }

        sleep 3
 '

```

\*\*while ssh after pipe is okay, echo xx just for adding more pipe \*\*

```
echo xx | ssh root@jump pwd

```