Sending commands to new shell in Perl

Discussion in 'Perl Misc' started by mario.demiguel@gmail.com, Jun 2, 2005.

  1. Guest

    I am trying to do the following in a Perl script:

    ssh to a remote machine
    once on the machine, switch to tcsh
    once in tcsh, execute commands

    I am a relative novice at Perl and would appreciate any help or
    suggestions. Thanks in advance!
    , Jun 2, 2005
    #1
    1. Advertising

  2. J. Gleixner Guest

    wrote:
    > I am trying to do the following in a Perl script:
    >
    > ssh to a remote machine
    > once on the machine, switch to tcsh
    > once in tcsh, execute commands


    Take a look at the Expect module on CPAN (http://search.cpan.org/).
    Also, using one of the many search engines first & frequently, probably
    will save you a lot of time in the future.

    Once you have read the documentation and tried to use it, then you can
    post specific questions about your code.

    >
    > I am a relative novice at Perl and would appreciate any help or
    > suggestions. Thanks in advance!


    No need to state the obvious. :)
    J. Gleixner, Jun 2, 2005
    #2
    1. Advertising

  3. wrote:
    > I am trying to do the following in a Perl script:
    >
    > ssh to a remote machine
    > once on the machine, switch to tcsh
    > once in tcsh, execute commands
    >
    > I am a relative novice at Perl and would appreciate any help or
    > suggestions. Thanks in advance!


    Take a look at the Net::SSH::perl module on cpan.org

    Robert Gamble
    Robert Gamble, Jun 3, 2005
    #3
  4. Tintin Guest

    <> wrote in message
    news:...
    >I am trying to do the following in a Perl script:
    >
    > ssh to a remote machine
    > once on the machine, switch to tcsh
    > once in tcsh, execute commands


    What's the reliance on tcsh? Without knowing your requirements, it maybe a
    simple as doing:

    ssh user@remote command

    Either invoked via system, or using one of the Perl SSH modules.
    Tintin, Jun 4, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,946
    Thomas Stegen
    Jun 28, 2003
  2. Tim Stanka
    Replies:
    1
    Views:
    784
    Jeff Epler
    Aug 2, 2004
  3. Dmitry
    Replies:
    2
    Views:
    198
    Dmitry
    Jul 12, 2004
  4. Murugesh
    Replies:
    5
    Views:
    177
  5. Replies:
    3
    Views:
    638
    alpha_beta_release
    Aug 24, 2006
Loading...

Share This Page