pxssh sendline() cmd

R

rajesh kumar

Hi

I need help in pxssh.

Steps :
1) I was login into remote machine usning pxssh and the prompt is '$'.
2) After successful login running some command and the prompt is '>'.
3) Here onwards I want to execute cli commands by using sendline().

My requirement: I need to pass arguments to sendline().
var = "00:00:00:00:00:00:00"
name = F2

Example : sendline (X Y var name)

in above example X and Y are keywords separated by space. var and name are arguments.

Could any one help quickly.

Note : If I use sendline(X Y 00:00:00:00:00:00:00 F2) was working fine.
 
P

Piet van Oostrum

rajesh kumar said:
Hi

I need help in pxssh.

Steps :
1) I was login into remote machine usning pxssh and the prompt is '$'.
2) After successful login running some command and the prompt is '>'.
3) Here onwards I want to execute cli commands by using sendline().

My requirement: I need to pass arguments to sendline().
var = "00:00:00:00:00:00:00"
name = F2

Example : sendline (X Y var name)

in above example X and Y are keywords separated by space. var and name are arguments.

Could any one help quickly.

Note : If I use sendline(X Y 00:00:00:00:00:00:00 F2) was working fine.

sendline("X Y %s %s" % (var, name))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top