Plink batch input menu prompt


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Plink batch input menu prompt
# 1  
Old 10-31-2011
Plink batch input menu prompt

I am automating voicemail backups and can use plink to login, but I want to pass input to the menu, not the linux shell:

This will log me in.....
Code:
c:\Batch>plink -ssh 10.12.99.64 -l root -pw 9999

I'd like to input an "S" with a "-m" remote command file for this, etc...
Code:
    MAIN MENU
(M) Mailbox maintenance
(R) Report generation
(S) System maintenance
(X) Exit
If you need help later, type ?.
COMMAND (M/R/S/X):

Thanks all.

Last edited by jim mcnamara; 11-01-2011 at 09:25 AM.. Reason: code tags please
# 2  
Old 11-01-2011
Have you seen "expect"?

Maybe "autoexpect" can help you with your problem: autoexpect

EDIT: I just saw you are in Windows, but you can use autoexpect there: http://michaelellerbeck.com/2009/02/...indows-solved/

Last edited by felipe.vinturin; 11-01-2011 at 09:47 AM..
# 3  
Old 11-01-2011
limited success

I've had limited success, sometimes works, sometimes doesn't and adds returns... with redirection <vmbkup.txt containing "S", etc... (no quotes), but very inconsistent.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with 'select' for menu input

A lot of my scripting makes use of the 'select' command to create menu driven input. A typical example of how I use it is as: somevar='' PS3='Select one: ' while ]; do select somevar in $(sqlplus -s $dbuser/$dbpw@mydb <<EOF set echo off feedback off verify off... (7 Replies)
Discussion started by: edstevens
7 Replies

2. Shell Programming and Scripting

Why menu won't allow 2 character input?

I’m trying to write a script for users to easily check folder size. The idea is to have a menu that starts at the top directory and then drills down to lower directories. Selections 1-9 work fine. The issue I’m having is any 2 digit menu selections (10+) doesn’t work and it returns the error... (3 Replies)
Discussion started by: MarkCyc
3 Replies

3. Programming

Running plink with user input interaction from vb.net

Hi there, I am trying to run a .sh file with plink from vb.net. I am now able to run the .sh on vb.net but i have a problem because the .sh script require user input: The .sh is prompting a few question and require user to input y/n to proceed. I am trying... (3 Replies)
Discussion started by: yun
3 Replies

4. Windows & DOS: Issues & Discussions

Validation in user input in batch script

I need to insert the validation in my batch script.When user enter the value it should be numeric+minimum length should be 2 for e.g. 02,03 if he puts 1a,1A,2a3 t hen should print the message that it is wrong and print te message enter valid value. Echo RC is in format of 02 set /p... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

5. Shell Programming and Scripting

Simple calculator with menu input - Need Help

I am trying to make a calculator. The user Enters number 1, chooses and operation, enters number 2, then chooses another operation or for the answer to be displayed. eg. 1 + 1 = or 1 + 1 + 2 + 1 = Both of these should be possible. #!/bin/bash read -p "what's the first number? " n1... (3 Replies)
Discussion started by: redshine6
3 Replies

6. Red Hat

Not able to see the terminal icon in the applications menu to launch the command prompt in Centos

After installing centos iam not able to see the terminal icon in the applications menu to launch the command prompt in Centos. However iam able to see the Open Terminal menu, when i right click and it is not working. let me know what are the things i need to check.:b: (1 Reply)
Discussion started by: Kesavan
1 Replies

7. UNIX for Dummies Questions & Answers

Input A Menu Selection In A Variable

hey all, me again....having a problem with my code, where I essentially am trying to show a menu, have the user select an option (from 1 to 5), then display which selection they picked... #!/bin/bash # A LIST OF THE ERROR MESSAGES AND THE PROPER SYNTAX: error_0="Correct amount of... (1 Reply)
Discussion started by: SoVi3t
1 Replies

8. Shell Programming and Scripting

read input file for batch job

hi all, I am a newbie in unix shell script. May I know how to write a bacth job to read a list of files afrom the inout file and do the chmod ? Thanks. i.e. inside input.txt ==== a.txt b.txt c.txt and I want to write a batch job to read the input .txt and do the chmod 755 for all 3... (14 Replies)
Discussion started by: kinmak
14 Replies

9. Shell Programming and Scripting

User Prompt during batch script process

The script below performs an incremental database backup. When the increment backup is out of sequence, the process prompts the user: "Incremental backup out of sequece. Do you wish to continue? Y or N". This script is set to run as a scheduled process in background mode. When the script... (2 Replies)
Discussion started by: bond007jlv
2 Replies

10. Shell Programming and Scripting

How to prompt for input & accept input in ONE line

hi, am a new learner to shell programming. i have a script which will prompt for user to key in their name & display their name afterwards. script ===== echo "Pls enter your name:" read name echo "Your name is $name." output ===== Pls enter your name: Bob Your name is Bob. what... (2 Replies)
Discussion started by: newbie168
2 Replies
Login or Register to Ask a Question