Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-23-2004, 07:33 PM   #1
Registered: Mar 2004
Posts: 40

Rep: Reputation: 15
automating using shell scripting

I am using Mandrake Linix Official, and I am picking it up rather fast.

I am having some applications which prompt for username, password and then a couple of key press (for yes/no). One such is the vpn client.

As I need to start the program automatically when my system boots, or thro any mouse click, I am in need of a solution to pass the parameters to the program.

For example, I will put my requirement as below.

I have a program which runs as below

Enter the first number : 2
Enter the second number : 4

Do you want to Add/Subtract/Multiply/Divide: Add

Result : 6

Program Completed.

I want to automate it fully. (No arguments can be passed to the program)

Old 07-23-2004, 10:57 PM   #2
LQ Newbie
Registered: Jul 2004
Posts: 16

Rep: Reputation: 2
cat <<END_OF_ANSWERS | /path/to/your/unix/unfriendly/program

This will only work if your program takes input from stdin. If not, then you must learn to use expect(1).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
automating lynx in a shell script yimboli Programming 15 04-04-2007 03:15 AM
Automating Bittorrent with shell scripts kyosuke Linux - General 4 07-01-2005 11:14 AM
Trouble when automating ftp with shell script hari_s_82 Linux - Newbie 2 09-23-2004 03:17 AM
Automating simple commands, scripting or programming? entob *BSD 3 09-01-2004 02:56 AM
Automating a playlist using shell script... DesiLILO Linux - Newbie 4 04-03-2004 12:03 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration