ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am new to shell scripting. I am trying to write a shell script that allows me to telnet to some IP, then on that IP, it propmts me to enter username and password, and then from that IP's command prompt it exit and returns to its own command promt.
And my main purpose of using the Shell Scripting is that I want to automate few test cases. The test case is like this:
First, on unix command prompt, I go into another application. This appplication has its own set of commands, and I want to test these commands, so can I write a shell script to test these commands.
Can you tell how will the program look like for such an automation.
I want to test a program in LINUX. The program is like this:
First, on linux command prompt I type my program name to enter into my program.
then it asks me for user name and password, like:
then, a new prompt is returned to me, like:
Then on this promt I want to test the commands which are specific to this program, i.e.
which are commands of this program, like:
[ABC]: CREATEUSER: js
/* User created.
# <linux prompt>
The EXIT commands brings me back to the linux prompt.
Can anyone provide me the code for testing these type of commands. My aim is that program
should automatically enter into the program, take username n passwd without human intervention,
then execute commands of programs and then exit from the program and returns to linux prompt
I also want to put results in a file so that I can parse it and check whether command is
executed successfully or not.........or if there is another better way then let me know.
What can I use for this type of testing and can you please provide me a small code for it.