tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: answer to shell script question after login


From: Canellas
Subject: Re: answer to shell script question after login
Date: Thu, 8 Dec 2011 09:37:23 -0200

Michael,

Thanks a lot!

Here is what the remote machine displays, after I enter my password:


Last   successful login for arbor: Thu Dec  8 09:27:36 BRST3BRDT 2011
Last unsuccessful login for arbor: Wed Dec  7 18:14:37 BRST3BRDT 2011
Last login: Thu Dec  8 09:27:36 2011 from 10.121.13.48
(c)Copyright 1983-2000 Hewlett-Packard Co.,  All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
(c)Copyright 1980, 1984, 1986 Novell, Inc.
(c)Copyright 1986-1992 Sun Microsystems, Inc.
(c)Copyright 1985, 1986, 1988 Massachusetts Institute of Technology
(c)Copyright 1989-1993  The Open Software Foundation, Inc.
(c)Copyright 1986 Digital Equipment Corp.
(c)Copyright 1990 Motorola, Inc.
(c)Copyright 1990, 1991, 1992 Cornell University
(c)Copyright 1989-1991 The University of Maryland
(c)Copyright 1988 Carnegie Mellon University
(c)Copyright 1991-2000 Mentat Inc.
(c)Copyright 1996 Morning Star Technologies, Inc.
(c)Copyright 1996 Progressive Systems, Inc.
(c)Copyright 1991-2000 Isogon Corporation, All Rights Reserved.


                           RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
Technical Data and Computer Software clause in DFARS 252.227-7013.

                           Hewlett-Packard Company
                           3000 Hanover Street
                           Palo Alto, CA 94304 U.S.A.

Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
You have mail.










Sele▒▒o de Ambiente Kenan/BP
Digite o numero do ambiente e pressione enter
3 - DBUNIT11      - Direct Billing - Teste Unit▒rio           - DEV8CADM - Kenan/BP 11
4 - DBTS11        - Direct Billing - Teste de Sistemas        - TST2CADM - Kenan/BP 11
7 - COBUNIT11     - Cobilling      - Teste Unit▒rio           - DEVCOB9  - Kenan/BP 11
8 - COBTS11       - Cobilling      - Teste de Sistemas        - INTCOB9  - Kenan/BP 11
10- CATI11        - Cati           - Teste de Sistemas        - CATI2    - Kenan/BP 11
11- CLAACC11      - Direct Billing - TS (Clarify Oracle 9)    - TST2CADM - Kenan/BP 11
12- CLAREP11      - Direct Billing - TS (Clarify Oracle 9)    - TST2CADM - Kenan/BP 11
13- RDUAL         - Direct Billing - TS (Clarify Oracle 9)    - DEV8CADM - Kenan/BP 11
14- DEVBIMA       - Direct Billing - Teste Unitario           - DEV8CADM - Kenan/BP 11
15- INTBIMA       - Direct Billing - Teste de Sistemas        - TST2CADM - Kenan/BP 11
16- CARRIERDV     - Direct Billing - Teste Unitario           - DEV8CADM - Kenan/BP 11
17- CARRIERTST    - Direct Billing - Teste de Sistemas        - TST2CADM - Kenan/BP 11
18- CARRIERDEVAIX - Direct Billing - Teste Unitario DB em AIX - TST2CADM - Kenan/BP 11
19- MDBACT        - Direct Billing - Teste de Sistemas        - TST2CADM - Kenan/BP 11


For my current work, I have to choose '3'.

And this is what I inserted into my '.emacs' file:

(defconst my-tramp-prompt-regexp
  (concat (regexp-opt '("Digite o numero do ambiente e pressione enter:") t)
         "\\s-*")
  "BLABLABLA.")

(defun my-tramp-action (proc vec)
  "Enter \"3\" in order to give a correct answer."
  (save-window-excursion
    (with-current-buffer (tramp-get-connection-buffer vec)
      (tramp-message vec 6 "\n%s" (buffer-string))
      (tramp-send-string vec "3"))))

(add-to-list 'tramp-actions-before-shell
            '(my-tramp-prompt-regexp my-tramp-action))



Thanks!




    Rodrigo Canellas

    -----------
    Programador C++ (http://code.google.com/p/tenacitas/)
    Fotógrafo amador (http://photo.net/photos/RodrigoCanellas)
 





2011/12/8 Michael Albinus <address@hidden>
Canellas <address@hidden> writes:

> Michael,

Hi Rodrigo,

> Is it ok to send another email, showing what the remote shell script
> displays, so that someone could help me configuring
> `tramp-actions-before-shell'?

Of course. Just send the login dialogue from an ordinary shell, and
we'll try to give you a recipe.

If there are no sensible information, you might keep address@hidden
in Cc, in order to let other people find the recipe in the
archives. Otherwise, send it to me off-list.

> Thanks!
>
> Rodrigo Canellas

Best regards, Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]