simple issue..

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users simple issue..
# 1  
Old 01-17-2008
simple issue..

I have a program. Everytime that I run that program ,it prints a disclaimer msg and prompts the user to accept the agreement (i.e: type 'y' or 'n').

Now I want to run the program multiple times with different inputs. So I wrote a script which runs in a loop and calls the program multiple times.

But the program wouldnt execute until someone presses 'y' to accept the disclamer msg. How do I make the script type in a 'y' every time the program prompts for it ?

its a simple shell script.
# 2  
Old 01-17-2008
sorry, I should have put a better topic.. and I should have posted this in the 'UNIX for beginners' section.. my bad.
# 3  
Old 01-17-2008
If you're accessing your unix system thru a PC running a terminal emulator, use QuickKeys on your PC to 'type' the responses needed.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can't solve a simple SSH/scp issue.. Please help.

Disclaimer: I tried searching but wasn't able to get to the answer so please don't flame. Scenario: I have a root script that generates a file on box1 and then needs to scp it over to box2 using user1. Both boxes are running open-ssh. root@locat-host# scp /tmp/file1 user1@box2:/tmp/file1 ... (10 Replies)
Discussion started by: denissi
10 Replies

2. Shell Programming and Scripting

Simple date issue

Hi , Here is the smaller version of the problem. Working individually as command ************************>echo $SHELL /bin/bash ************************>TO_DAY=`date` ************************>echo $TO_DAY Tue Jul 16 02:28:31 EDT 2013 ************************> Not working when... (5 Replies)
Discussion started by: Anupam_Halder
5 Replies

3. Shell Programming and Scripting

Simple issue, what is wrong?

I had this working a few days ago but I since changed it. Heres the code x=1 while 1 2 3 4 5 6 1=$(ps -ef | grep process | awk '{ print $2}') if then echo "The database is accepting connections..." echo "Now I will check the next process" 2=$(ps -ef | grep process1 |... (10 Replies)
Discussion started by: jeffs42885
10 Replies

4. Shell Programming and Scripting

Simple SED issue

Hi! I'm a newbie and can't find the exact sed to make this work. I've installed CentOS and am trying to pass variables to a network-config file. variables: $ipAddress $netmask $gateway file: DeviceList.Ethernet.eth0.IP= DeviceList.Ethernet.eth0.Netmask= (5 Replies)
Discussion started by: greipr
5 Replies

5. Shell Programming and Scripting

Simple Cut issue

I have a long string that looks something like this.... <string></string> I need to but the tar file name. So I need to put between "/" and ".tar</string>". My desired result should be "tarfile_date". (7 Replies)
Discussion started by: elbombillo
7 Replies

6. Shell Programming and Scripting

simple for loop/cat issue

ok.. so problem is: I have a file that reads: cat 123 1 and 2 3 and 4 5 and 6 I was using for loops to run through this information. Code: for i in `cat 123` do echo $i done shouldn't the output come as 1 and 2 (3 Replies)
Discussion started by: foal_11
3 Replies

7. Shell Programming and Scripting

simple if/then issue in korn shell

When I run this, it tests to Y, but why? If I take the double quotes off of test, i get the same. # !/bin/ksh TEST="N" if ; then echo $TEST" yes" else echo "no" fi (4 Replies)
Discussion started by: guessingo
4 Replies

8. Shell Programming and Scripting

Simple date issue

Hi all, i have used the search already before someone shouts at me and i have seen the 'datecalc' program but this is not working correctly for me in the shell and environment i am using. I am using solaris 10 and bourne shell. I have two dates '07-04-2009' and '05-05-2009'. I just need to... (2 Replies)
Discussion started by: muay_tb
2 Replies

9. Programming

simple scanf issue ?

Hello everyone, I hope someone is awake to help me on this.. hey How can I do something like this: The user is asked is asked to enter an int value, but I want to provide a default value on stdout, which they can back space and change it to whatever they want.. for e.g: Enter the... (4 Replies)
Discussion started by: the_learner
4 Replies

10. UNIX for Dummies Questions & Answers

something simple, but i have no idea: a login issue

Hi all, I have a problem not really dramatic but realyl annoying: i've got a groups of users who logon a sunos 2.3 box via a windows telnet client (KEAI, but this is not the problem). they login as perso1 and password. It takes a very very very long time to get in. If i log on the same box... (2 Replies)
Discussion started by: penguin-friend
2 Replies
Login or Register to Ask a Question